php-general Digest 10 Jan 2001 23:46:51 -0000 Issue 447

Topics (messages 33648 through 33844):

Re: Shopping Cart Schema - Sessions
        33648 by: Teodor Cimpoesu
        33652 by: Paul K Egell-Johnsen
        33682 by: JB
        33694 by: JB
        33696 by: Teodor Cimpoesu

Re: Show output of program in realtime on website
        33649 by: Brad Hubbard
        33650 by: Stefan Scherf
        33651 by: Brad Hubbard
        33699 by: Christian Reiniger

Changing passwords
        33653 by: A.D. Vijverberg
        33703 by: Chris Lee

Re: looking for a PHP editor
        33654 by: Chris Hayes
        33659 by: defender of the protocol
        33661 by: Markus H. Maussner
        33662 by: Daniel Solin
        33663 by: Pavel Jartsev
        33664 by: William Bailey
        33665 by: Alexander Wagner
        33666 by: Miles Thompson
        33667 by: Toby Miller
        33669 by: Alexander Wagner
        33671 by: Matthew Mundy
        33700 by: Egan
        33701 by: Christian Reiniger
        33702 by: Wacks, David
        33704 by: Cal Evans
        33705 by: Egan
        33715 by: Philip Olson
        33716 by: Boget, Chris
        33721 by: Egan
        33723 by: Cynic
        33724 by: Boget, Chris
        33725 by: Miles Thompson
        33729 by: Philip Olson
        33730 by: Cynic
        33731 by: jeremy brand
        33732 by: Cynic
        33741 by: Webintellects Tech Support
        33742 by: JB
        33808 by: MR
        33821 by: Alexander Wagner
        33824 by: Alexander Wagner
        33833 by: Toby Butzon
        33838 by: Brian Clark

Adding comma's to numeric string
        33655 by: Timothy G. Wells
        33656 by: Cynic

iptc fields
        33657 by: Markus H. Maussner
        33777 by: Thies C. Arntzen

Re: gdImageCreateFromGif compile
        33658 by: \"Cyb\"

Fields to large for php3
        33660 by: Paul Lewis
        33695 by: Chris Lee

Shorter way for "each"
        33668 by: Moritz Petersen
        33670 by: Cynic
        33672 by: Alexander Wagner
        33674 by: Moritz Petersen
        33692 by: Chris Lee
        33693 by: Wico de Leeuw
        33709 by: Moritz Petersen

to be persistent connected or not to be persistent connected
        33673 by: Kayra Otaner
        33678 by: Jon Haworth
        33680 by: Marcelo Gulin

urlencode problem
        33675 by: Zhihong Pan
        33676 by: Cynic

Re: Calling a Windows Com object or an Extended Fetch?
        33677 by: Paulson, Joseph V. \"Jay\"
        33679 by: Miles Thompson
        33686 by: Niel Zeeman

Re: include path confusion
        33681 by: Randy
        33837 by: Brian Clark

Functions
        33683 by: Augusto Cesar Castoldi
        33685 by: Emil Rasmussen
        33688 by: Emil Rasmussen
        33690 by: Chris Lee
        33722 by: Marcelo Gulin

Shopping Carts
        33684 by: Brandon Orther
        33687 by: John Guynn
        33707 by: Chris Lee

Re: PHP newbie question
        33689 by: Toby Butzon
        33726 by: Neil Zanella
        33728 by: Cynic
        33734 by: Dave M.
        33746 by: David Tod Sigafoos
        33747 by: Joe Stump
        33756 by: Neil Zanella
        33769 by: Hsieh, Wen-Yang
        33779 by: Neil Zanella
        33819 by: Hsieh, Wen-Yang

IIS4 problem
        33691 by: VALLET, Luc

Re: declaring variables in class definitions
        33697 by: sam1600.iname.com
        33714 by: Max A. Derkachev
        33739 by: sam1600.iname.com
        33748 by: Joe Stump
        33749 by: Toby Butzon
        33771 by: sam1600.iname.com
        33772 by: Toby Butzon

Attaching to a PostgreSQL database on a Linux box from a VB app o n NT4
        33698 by: Brinkman, Theodore

knowing file's mime-type
        33706 by: Nikolai Vladychevski
        33708 by: Chris Lee
        33733 by: Nikolai Vladychevski
        33736 by: Cynic
        33737 by: Cynic

Re: is there a builtin php function for this ?
        33710 by: Monte Ohrt

HELP HELP! PLEASE! Interfacing EMail to PHP
        33711 by: Dieter Kneffel

Re: [PHP-WIN] Attaching to a PostgreSQL database on a Linux box from a VB app on NT4
        33712 by: alain samoun

Code diagnostics & profiling
        33713 by: Guille -bisho-

cgi--remove X-Powered-By and Content-type
        33717 by: Tom Harris
        33718 by: Philip Olson
        33719 by: Cynic

Calling a funtion inside a function
        33720 by: Alan Todd
        33727 by: Moritz Petersen
        33735 by: O.Cook.etoncollege.org.uk

Compile Problem:  Place for Help
        33738 by: Mark Olbert

JavaScript and PHP ... are they at all the same?
        33740 by: Brandon Orther
        33743 by: Marcelo Gulin

Re: Checking whether a MySQL table exists
        33744 by: mailing_list.gmx.at
        33745 by: mailing_list.gmx.at
        33755 by: Hsieh, Wen-Yang

Sessions
        33750 by: Brandon Orther
        33752 by: Jon Rosenberg
        33761 by: Julie Meloni

input processor function
        33751 by: Jon Rosenberg
        33753 by: Joe Stump

strip_tags ?
        33754 by: Jon Rosenberg

MySQL SELECT performance suggestions
        33757 by: webbie.deanox.com
        33758 by: Joe Stump
        33789 by: Monte Ohrt
        33818 by: Christian Reiniger

variables not being passes between php pages
        33759 by: jeff fitzmyers
        33760 by: Joe Stump
        33764 by: jeff fitzmyers
        33780 by: jeremy brand

constants inside of a string
        33762 by: jeff saenz
        33763 by: Moritz Petersen
        33765 by: Joe Stump
        33766 by: jeff saenz
        33767 by: Joe Stump
        33774 by: Toby Butzon
        33781 by: jeremy brand
        33782 by: jeremy brand

pause
        33768 by: Robert Ludvik
        33773 by: Toby Butzon
        33783 by: jeremy brand
        33784 by: DanO
        33791 by: jeremy brand
        33812 by: Shane McBride

Re: XML
        33770 by: Michael Bell

Dreamwever for PHP?
        33775 by: Marcus Ouimet
        33778 by: Alexander Wagner
        33786 by: Alain Fontaine
        33788 by: Marcus Ouimet

Session Errors, do you recognize?
        33776 by: JB
        33790 by: Shane McBride
        33792 by: Shane McBride
        33793 by: JB
        33795 by: Javier Muniz
        33800 by: JB

Warning
        33785 by: Chris

Announce: php_imlib 0.3: PHP Imlib2 extension
        33787 by: Matt McClanahan

Cannot send session cache limiter - headers already sent   Cannot send session cookie 
- headers already sent by
        33794 by: JB

Each site with its php.ini?
        33796 by: Diego Fulgueira

How can I get a random number
        33797 by: Brandon Orther
        33799 by: Web Master
        33807 by: Monte Ohrt
        33809 by: Shane McBride
        33810 by: WreckRman2
        33815 by: Cal Evans
        33832 by: Philip Olson
        33836 by: Jerry Lake
        33843 by: Philip Olson

PHP simulator
        33798 by: Todd Cary
        33801 by: Cal Evans
        33803 by: John Guynn
        33804 by: Toby Butzon
        33816 by: John Meyerhofer
        33825 by: Todd Cary
        33826 by: Todd Cary
        33827 by: Ignacio Vazquez-Abrams
        33828 by: David Tod Sigafoos
        33829 by: Toby Butzon

BIG include file !!!
        33802 by: Abe
        33805 by: Jason Murray
        33814 by: Web Master
        33842 by: Abe

rand is not random for me :(
        33806 by: Brandon Orther
        33811 by: Web Master
        33817 by: James Atkinson

PHP 4.0.4 / phpMyAdmin
        33813 by: Erica Douglass
        33830 by: Erica Douglass

php 4 isn't parsing php.3 files
        33820 by: linux.actionbusinesssystems.com
        33822 by: Ignacio Vazquez-Abrams
        33823 by: Alexander Wagner
        33834 by: Marcelo Gulin

problem with includes
        33831 by: James Mclean
        33839 by: Brian Clark
        33841 by: Brian Clark

ibase (firebird) localhost login ?
        33835 by: Chris Hayes

Re: Connect problem
        33840 by: Brian Clark

Re: mixing HTML and PHP code
        33844 by: MR

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]


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


Hi Jason!
On Wed, 10 Jan 2001, Jason Beebe wrote:

> Hey, 
> 
> I'm looking for little information from those who have coded their own shopping cart 
>apps. what would you say the best way to setup a cart would be? more specificly, the 
>method for adding items to the cart.
> 
eww, lost wrapping ...

> say the user is broswing around. when they entered the website a new session was 
>created. when they go to add an item, what is the best way store variables (such as 
>what they bought and quantity) in the session. i have read that it is possible to put 
>all of your session variables in a single associative array. however, i have not had 
>any luck doing this myself. Under such a method of an array, how would i store each 
>item (product id and quantity, possibly price as well) in the cart into the session. 
>obviously i don't expect anyone to write an entire app. i am comfortable starting the 
>session, and doing th db extraction and presentation. i just need to know how to 
>store a variable in a session (passed through post) and how to extract it when need 
>be (considering it is an array). Thanks a lot!

I codded a shopping cart which allowed `thin sessions' and `fat sessions'.

Thin would mean I store only the IDs, then retrieve the rest of the
information about the product from the DB (more DB queries, but smaller
session data), while `fat' would mean I store all the data I need to display
when the user invetories his/her cart, namely name, price &|short desc.,
quantity.

Some code snippets would be:

if (!$SES->isRegistered ('cart.object')) {
     $CART = new Cart();
         $CART->setLanguage (CART_LANGUAGE);
         $SES->setAttribute ('cart.object', $CART);
}

$CART = &$SES->getAttribute ('cart.object');

then go ahead and use the cart object:
...
$CART->addItem ($sku, 1, new Product($arr_attr));
$CART->dropItem ($sku);

And the Product class has among others, these two methods:

 __setStorageType ($t) 
{  
        if ($t == CART_FAT_SESS) {
        $this->_slots = array_keys (get_object_vars ($this));
        unset ($this->_slots['_desc']);
    }
}

function __sleep ()
{
    return  (isset ($this->_slots) ? $this->_slots : array ('_quant'));     
}

This is in the manner of Session class from PHPLIB which records what is to
be saved in the session (in this case, what attributes.)

And the Cart class has:

function __wakeup ()
{
 if ($this->STORAGE == CART_THIN_SESS) {
        $pr_attrs = Cart::getItemsAttr (array_keys($this->_items));

    foreach ($pr_attrs as $sku => $attrs) {
        $attrs['quant'] = $this->_items[$sku]->getQuantity();
                $this->_items[$sku] = new Product ($attrs);
    }
 }
}

Note that __sleep() and __wakeup() are PHP serialisation hooks, which can customize
the marshalling/unmarshalling process (e.g. restore DB connections, etc.)

cheers,

-- teodor




Jason Beebe wrote:
> 
> Hey,
> 
> I'm looking for little information from those who have coded their own shopping cart 
>apps. what would you say the best way to setup a cart would be? more specificly, the 
>method for adding items to the cart.
> 
> say the user is broswing around. when they entered the website a new session was 
>created. when they go to add an item, what is the best way store variables (such as 
>what they bought and quantity) in the session. i have read that it is possible to put 
>all of your session variables in a single associative array. however, i have not had 
>any luck doing this myself. Under such a method of an array, how would i store each 
>item (product id and quantity, possibly price as well) in the cart into the session. 
>obviously i don't expect anyone to write an entire app. i am comfortable starting the 
>session, and doing th db extraction and presentation. i just need to know how to 
>store a variable in a session (passed through post) and how to extract it when need 
>be (considering it is an array). Thanks a lot!

A session cookie can be of max 4096 bytes, so there is a limit to what
you can set. Also it is (I'm not sure if this is part of the cookie
standard) a general standard that only the supplier sites name and the
user's ID should be stored, nothing else.

Instead you can use the session id as the id of tables used for storing
info:

session_id
key
value

Then you could store key value pairs in say a database. The above
example is, btw, a misuse of relational databases, and should not be
taken as the way of doing things.

You should use a databaase in the background and store info in tables, a
structure might be something like:

customer_history
-----------
session_id
cart_id

cart
-----
id
total
date

cart_item
-------
cart_id
item_id
quantity
price_pr_unit

item
-------
id
name

In this structure you can give each customer a number of carts (ie,
previous orders), you can let each cart have several items, you will
know the quantity of each item, and the item price for this (allowing
for prices which are variable with price/discounts).

You should also consider that you don't want people to register until
checkout (just to mention this), if they aren't registered customers
from before.

If you want to read more about this, take a look at
http://developer.ez.no where you can learn about eZ trade which has
implemented such a shopping cart system. You'll find code, examples,
design documents, administration documents and discussions covering this
software. The software is free under the GNU GPL.

-- 
Paul K Egell-Johnsen
Developer/PR Manager
eZ systems as
http://ez.no/




ok, this all looks good, but then I again I am having a problem figuring out
that code you wrote below. the code i'm attempting to write isn't going to
be complex. there's maybe 10 or 15 items going to be sold. it would be very
rare if the customer ever had 1 or 2 things in their basket, let alone more
than that. i think i'm looking for a simpler solution. from what i had read,
though i couldn't get to work, this would be an acceptable method of
starting a sessions and trapping the variables without a million
session_register calls.

session_start();
session_register("sessvar");
$sessvar["user"]["name"] = $login_name;
$sessvar["cart"]["item1"] = $prod_id;
$sessvar["cart"]["qty1"] = $qty;

Then.. I should be able to access them like:

print "$sessvar['user']['name']";
etc...

does this make sense to you? or anyone else?
all i need is a sure fire way to easily hold a few variables throughout the
site. i'm not concerned about holding the keys in a db, as with the small
activity on this site, and the fact the writing to a local file will not
rpoduce any noticable difference over a db query on my machine w/ its
traffic, the db is not needed for this.

so.. all i need is a good simple method to register the following varables:
uid (user id)
p1 (product id for item 1)
q1 (qty for item 1)

and a method to increase the next variable to p2, q2, p3,q3 etc to represent
other items in the cart.

i think i should be able to figure out how to manipulate/extract the data
and work with it from there (in an array) once i am able to get them
registered. really i would just need a method for walking through the
array(s) to pull out the data. but if anyone has any suggestions on that too
i'd love to hear em.

thanks for the help everyone.


> > Hey,
> >
> > I'm looking for little information from those who have coded their own
shopping cart apps. what would you say the best way to setup a cart would
be? more specificly, the method for adding items to the cart.
> >
> eww, lost wrapping ...
>
> > say the user is broswing around. when they entered the website a new
session was created. when they go to add an item, what is the best way store
variables (such as what they bought and quantity) in the session. i have
read that it is possible to put all of your session variables in a single
associative array. however, i have not had any luck doing this myself. Under
such a method of an array, how would i store each item (product id and
quantity, possibly price as well) in the cart into the session. obviously i
don't expect anyone to write an entire app. i am comfortable starting the
session, and doing th db extraction and presentation. i just need to know
how to store a variable in a session (passed through post) and how to
extract it when need be (considering it is an array). Thanks a lot!
>
> I codded a shopping cart which allowed `thin sessions' and `fat sessions'.
>
> Thin would mean I store only the IDs, then retrieve the rest of the
> information about the product from the DB (more DB queries, but smaller
> session data), while `fat' would mean I store all the data I need to
display
> when the user invetories his/her cart, namely name, price &|short desc.,
> quantity.
>
> Some code snippets would be:
>
> if (!$SES->isRegistered ('cart.object')) {
>      $CART = new Cart();
> $CART->setLanguage (CART_LANGUAGE);
> $SES->setAttribute ('cart.object', $CART);
> }
>
> $CART = &$SES->getAttribute ('cart.object');
>
> then go ahead and use the cart object:
> ...
> $CART->addItem ($sku, 1, new Product($arr_attr));
> $CART->dropItem ($sku);
>
> And the Product class has among others, these two methods:
>
>  __setStorageType ($t)
>

>   if ($t == CART_FAT_SESS) {
>     $this->_slots = array_keys (get_object_vars ($this));
>         unset ($this->_slots['_desc']);
>     }
> }
>
> function __sleep ()
> {
>     return  (isset ($this->_slots) ? $this->_slots : array ('_quant'));
> }
>
> This is in the manner of Session class from PHPLIB which records what is
to
> be saved in the session (in this case, what attributes.)
>
> And the Cart class has:
>
> function __wakeup ()
> {
>  if ($this->STORAGE == CART_THIN_SESS) {
> $pr_attrs = Cart::getItemsAttr (array_keys($this->_items));
>
>     foreach ($pr_attrs as $sku => $attrs) {
>     $attrs['quant'] = $this->_items[$sku]->getQuantity();
> $this->_items[$sku] = new Product ($attrs);
>     }
>  }
> }
>
> Note that __sleep() and __wakeup() are PHP serialisation hooks, which can
customize
> the marshalling/unmarshalling process (e.g. restore DB connections, etc.)
>
> cheers,
>
> -- teodor
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





I also forgot to mention. I am leaning towards using GET to send the session
ids. Many people have told me that customer penatration decreases, some
times significantly, when requiring cookies to use the cart. How would this
have an effect on my script? i will have to call the sessid in all of my
links, correct?


> ok, this all looks good, but then I again I am having a problem figuring
out
> that code you wrote below. the code i'm attempting to write isn't going to
> be complex. there's maybe 10 or 15 items going to be sold. it would be
very
> rare if the customer ever had 1 or 2 things in their basket, let alone
more
> than that. i think i'm looking for a simpler solution. from what i had
read,
> though i couldn't get to work, this would be an acceptable method of
> starting a sessions and trapping the variables without a million
> session_register calls.
>
> session_start();
> session_register("sessvar");
> $sessvar["user"]["name"] = $login_name;
> $sessvar["cart"]["item1"] = $prod_id;
> $sessvar["cart"]["qty1"] = $qty;
>
> Then.. I should be able to access them like:
>
> print "$sessvar['user']['name']";
> etc...
>
> does this make sense to you? or anyone else?
> all i need is a sure fire way to easily hold a few variables throughout
the
> site. i'm not concerned about holding the keys in a db, as with the small
> activity on this site, and the fact the writing to a local file will not
> rpoduce any noticable difference over a db query on my machine w/ its
> traffic, the db is not needed for this.
>
> so.. all i need is a good simple method to register the following
varables:
> uid (user id)
> p1 (product id for item 1)
> q1 (qty for item 1)
>
> and a method to increase the next variable to p2, q2, p3,q3 etc to
represent
> other items in the cart.
>
> i think i should be able to figure out how to manipulate/extract the data
> and work with it from there (in an array) once i am able to get them
> registered. really i would just need a method for walking through the
> array(s) to pull out the data. but if anyone has any suggestions on that
too
> i'd love to hear em.
>
> thanks for the help everyone.
>
>
> > > Hey,
> > >
> > > I'm looking for little information from those who have coded their own
> shopping cart apps. what would you say the best way to setup a cart would
> be? more specificly, the method for adding items to the cart.
> > >
> > eww, lost wrapping ...
> >
> > > say the user is broswing around. when they entered the website a new
> session was created. when they go to add an item, what is the best way
store
> variables (such as what they bought and quantity) in the session. i have
> read that it is possible to put all of your session variables in a single
> associative array. however, i have not had any luck doing this myself.
Under
> such a method of an array, how would i store each item (product id and
> quantity, possibly price as well) in the cart into the session. obviously
i
> don't expect anyone to write an entire app. i am comfortable starting the
> session, and doing th db extraction and presentation. i just need to know
> how to store a variable in a session (passed through post) and how to
> extract it when need be (considering it is an array). Thanks a lot!
> >
> > I codded a shopping cart which allowed `thin sessions' and `fat
sessions'.
> >
> > Thin would mean I store only the IDs, then retrieve the rest of the
> > information about the product from the DB (more DB queries, but smaller
> > session data), while `fat' would mean I store all the data I need to
> display
> > when the user invetories his/her cart, namely name, price &|short desc.,
> > quantity.
> >
> > Some code snippets would be:
> >
> > if (!$SES->isRegistered ('cart.object')) {
> >      $CART = new Cart();
> > $CART->setLanguage (CART_LANGUAGE);
> > $SES->setAttribute ('cart.object', $CART);
> > }
> >
> > $CART = &$SES->getAttribute ('cart.object');
> >
> > then go ahead and use the cart object:
> > ...
> > $CART->addItem ($sku, 1, new Product($arr_attr));
> > $CART->dropItem ($sku);
> >
> > And the Product class has among others, these two methods:
> >
> >  __setStorageType ($t)
> >
>
> >   if ($t == CART_FAT_SESS) {
> >     $this->_slots = array_keys (get_object_vars ($this));
> >         unset ($this->_slots['_desc']);
> >     }
> > }
> >
> > function __sleep ()
> > {
> >     return  (isset ($this->_slots) ? $this->_slots : array ('_quant'));
> > }
> >
> > This is in the manner of Session class from PHPLIB which records what is
> to
> > be saved in the session (in this case, what attributes.)
> >
> > And the Cart class has:
> >
> > function __wakeup ()
> > {
> >  if ($this->STORAGE == CART_THIN_SESS) {
> > $pr_attrs = Cart::getItemsAttr (array_keys($this->_items));
> >
> >     foreach ($pr_attrs as $sku => $attrs) {
> >     $attrs['quant'] = $this->_items[$sku]->getQuantity();
> > $this->_items[$sku] = new Product ($attrs);
> >     }
> >  }
> > }
> >
> > Note that __sleep() and __wakeup() are PHP serialisation hooks, which
can
> customize
> > the marshalling/unmarshalling process (e.g. restore DB connections,
etc.)
> >
> > cheers,
> >
> > -- teodor
> >
> > --
> > PHP General Mailing List (http://www.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]
>
>





Hi JB!
On Wed, 10 Jan 2001, JB wrote:

> ok, this all looks good, but then I again I am having a problem figuring out
> that code you wrote below. the code i'm attempting to write isn't going to
> be complex. there's maybe 10 or 15 items going to be sold. it would be very
> rare if the customer ever had 1 or 2 things in their basket, let alone more
> than that. i think i'm looking for a simpler solution. from what i had read,
> though i couldn't get to work, this would be an acceptable method of
> starting a sessions and trapping the variables without a million
> session_register calls.
> 
> session_start();
> session_register("sessvar");
> $sessvar["user"]["name"] = $login_name;
> $sessvar["cart"]["item1"] = $prod_id;
> $sessvar["cart"]["qty1"] = $qty;
> 
> Then.. I should be able to access them like:
> 
> print "$sessvar['user']['name']";
> etc...
> 
yap, just like that!
have you tried it yet?
Just remember to test if the array variable isn't already set so not to
overwrite the old values by accident (use session_is_registered(), I think)

> all i need is a sure fire way to easily hold a few variables throughout the
> site. i'm not concerned about holding the keys in a db, as with the small
> activity on this site, and the fact the writing to a local file will not
> rpoduce any noticable difference over a db query on my machine w/ its
> traffic, the db is not needed for this.
> 
My advice is to have a clear idea of what you really want, and write it down
first. Clearely formulate your problem to solve, and don't jump at coding as
most guru coders do :) Start simple.

> so.. all i need is a good simple method to register the following variables:
> uid (user id)
> p1 (product id for item 1)
> q1 (qty for item 1)
> 
[products.php]            [cart.php]
{uid, product_id, quantity} ---> {$cart, $user}

in cart.php you do:

session_start();

// don't mix different data (products w/ user data)
// have them in separate entities

if (!session_is_registered('cart')) {
                $cart = array();
                session_register('cart');
}

if (!session_is_registered('user')) {
                $user = array();
                session_register('user');
}

// you may have different operations on the cart. 
// let's say we add something, so we receive {uid,product_id, quantity}
// from products.php
...
$cart[$product_id] = $quantity;

I am not sure why do you need user id, as every session is `customized' for a
user, who has a corresponding session_id in your application.

> and a method to increase the next variable to p2, q2, p3,q3 etc to represent
> other items in the cart.

for this example, I thought the `key' in the array to be the  product_id (a user
can have one or more products identified by their id).

> i think i should be able to figure out how to manipulate/extract the data
> and work with it from there (in an array) once i am able to get them
> registered. really i would just need a method for walking through the
> array(s) to pull out the data. but if anyone has any suggestions on that too
> i'd love to hear em.
 
You must view it this way when writing your php code for the problem: 
you have a session associated with a user (1 to 1 relationship) in which you
store pertinent data related to users actions. We call it session because it
persists over several requests.

A user can request one or more products (a 1 to n relationship), and the
information will be stored in the session. Simple, isn't it? :)

cheers,

-- teodor




I've seen this done with some CGI (not PHP) programs like online traceroutes
and things.

Is there something you can do with a CGI lib that facilitates this?

Cheers,
Brad

----- Original Message -----
From: "Christian Reiniger" <[EMAIL PROTECTED]>
To: "Stefan Scherf" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 22:21
Subject: Re: [PHP] Show output of program in realtime on website


On Wednesday 10 January 2001 00:08, Stefan Scherf wrote:

> the program "main" produces x times an output with an delay of 1 second
> between each output.
>
> I want to show this output in "realtime" on a website (this should
> become a progress-bar).

> Does anybody know how to realise this?

Write a custom browser for this and tell all your visitors to use it.
Seriously - you can't control how the browsers buffer the received data,
when they render it etc.

That said - make sure that PHP output buffering is off

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

Those who will not reason, are bigots,
those who cannot, are fools,
and those who dare not, are slaves.

- George Gordon Noel Byron (1788-1824), [Lord Byron]

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






""Brad Hubbard"" <[EMAIL PROTECTED]> schrieb:
> Is there something you can do with a CGI lib that facilitates this?

this one works:

$fp = popen ("ping www.test.de -c 20", "r"); // output with delay
// $fp = popen ("main", "r");                // one output, no delay
while( $zeile=fgets($fp,100) ) {
   echo $zeile."<br>";
   flush();                                  // flush output-buffer
}

maybe the problem is in the c-programm "main":

int main() {
   int i;
   for(i=0;i<10;i++) {
      printf("Output: %i\n",i);
      sleep(1);
   }
   return;
}

any suggestions?

Stefan






Have you tried passthru() instead of popen() ?





On Wednesday 10 January 2001 13:11, Stefan Scherf wrote:

> maybe the problem is in the c-programm "main":
>
> int main() {
>    int i;
>    for(i=0;i<10;i++) {
>       printf("Output: %i\n",i);

The "\n" triggers a buffer flush if I'm not completely mistaken, so there 
shouldn't be a problem

>       sleep(1);
>    }
>    return;

Your compiler should throw an error here - main is declared as "int" but 
doesn't return a value

> }

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

Those who will not reason, are bigots,
those who cannot, are fools,
and those who dare not, are slaves.

- George Gordon Noel Byron (1788-1824), [Lord Byron]




Hello,

i have got a question I can't find the answer to. I want to enable my users
to change their password for a intranet and their mail account (different
machine than the Intranet). i want my users to do this throug a web
interface on the intranet. Can anyone tell me how I can make an app to do
this in PHP. If a password chang request is made, the old password has to be
validated to prevent others to change the password while the computer is
logged on to the intranet but the person of that system is away for some
reason.

And how can I change the password on the standalone mailserver (using the
same concept as above) which is an other machine as the machine my Intranet
runs on.

The machine for the Intranet is a suse 7.0 machine and the mailserver is a
normal pc running Sun Solaris 2.6 intel.

Thanx in advance.

Kind regards,

A.D. Vijverberg





That's quite a big request :) here are a few tips you might allready know.
changin the passwd for a user to view a site isnt that hard, just store the
username and password in a db, this is the file I use, nb. fetch_db_value()
replace with your own sql functions

<?
 function mtime()
 {
   $mtime = microtime();
   $mtime = ereg_replace('\.', '', $mtime);
   $mtime = explode(' ', $mtime);
   $mtime = $mtime[1] . $mtime[0];
  return($mtime);
 }

 function bad_passwd()
 {
  echo "You have entered an invalid password.<br>\n";
  exit();
 }

 session_start();

 if (!isset($SessionID))
 {
  $SessionID = mtime();
  session_register("SessionID");
 }

 if ( isset($PHP_AUTH_USER) AND isset($PHP_AUTH_PW) AND $peop_r =
fetch_db_value('people_manager', "WHERE username = '$PHP_AUTH_USER' AND
password = '$PHP_AUTH_PW' ") )
  $SessionID = $peop_r['peopleID'];
 else
 {
  Header("WWW-Authenticate: Basic realm='$SERVER_NAME' ");
  Header("HTTP/1.0 401 Unauthorized");
  bad_passwd();
 }
?>

just include this file on the top of every page you want passwd protected,
change the passwd in the db and this script will confirm the passwd allways.
Now for changing the passwd for a mailserver ona  remote box, well there
aint no easy way todo this. so I wont even try. I have idea's about setting
some small http server on that box, passwd protect it, and build a small php
page on THAT server to handel the passwd changes, using exec() ? maybe
modifying /etc/passwd using the builting crypt() functions, I dont have any
experience when it somes to that.

Im unsure when you say the old passwd still has to be valid because of
someone being away from the computer? when the passwd is changed the old
passwd would be invalid, thats the point of changing a passwd :) are
multiple users going to login with one username / passwd ? thats not such a
good idea, with individual username passwds individuals can have their
access restricted, alot easier to maintain. also with multiple users single
passwd systems, who decided to change the passwd? your opening up the door
to piss people off, some jerk decideds hes going to change the passwd and
not tell anyone. real nice. haha

Chris Lee
Mediawaveonline.com




""A.D. Vijverberg"" <[EMAIL PROTECTED]> wrote in message
002301c07b4d$da653d20$cd64a8c0@milaan">news:002301c07b4d$da653d20$cd64a8c0@milaan...
> Hello,
>
> i have got a question I can't find the answer to. I want to enable my
users
> to change their password for a intranet and their mail account (different
> machine than the Intranet). i want my users to do this throug a web
> interface on the intranet. Can anyone tell me how I can make an app to do
> this in PHP. If a password chang request is made, the old password has to
be
> validated to prevent others to change the password while the computer is
> logged on to the intranet but the person of that system is away for some
> reason.
>
> And how can I change the password on the standalone mailserver (using the
> same concept as above) which is an other machine as the machine my
Intranet
> runs on.
>
> The machine for the Intranet is a suse 7.0 machine and the mailserver is a
> normal pc running Sun Solaris 2.6 intel.
>
> Thanx in advance.
>
> Kind regards,
>
> A.D. Vijverberg
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>







> I went to their homepage, and couldn't find a link to download
> the actual program, just some example stuff, and it says "coming
> soon"... Is it out there somewhere and I'm just retarded, or are
> you mob on a beta list or something???

www.codecharge.com/download

Their homepage is sort of hidden because it's still in beta.
Like in the version i downloaded the generated code gave a lot of PHP errors.
I understand they are working on it every day, sometimes it works, sometimes 
not.

Also my trial period was only 1 day due to some error.


Chris



--------------------------------------------------------------------
--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
--------------------------------------------------------------------

 




the specialized editors for php are bs, you don't need an IDE to script 
your web page or anything else for that matter

http://www.ultraedit.com

go get a copy of UltraEdit, download the wordfile for php syntax so it 
highlights properly, and you're set

http://www.ultraedit.com/downloads/additional.html

i'm sure someone on this list has said this before

- jeremy

At 07:49 PM 1/9/2001, you wrote:

> > I went to their homepage, and couldn't find a link to download
> > the actual program, just some example stuff, and it says "coming
> > soon"... Is it out there somewhere and I'm just retarded, or are
> > you mob on a beta list or something???
>
>www.codecharge.com/download
>
>Their homepage is sort of hidden because it's still in beta.
>Like in the version i downloaded the generated code gave a lot of PHP errors.
>I understand they are working on it every day, sometimes it works, sometimes
>not.
>
>Also my trial period was only 1 day due to some error.
>
>
>Chris
>
>
>
>--------------------------------------------------------------------
>--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
>--------------------------------------------------------------------
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]





hi..

..i am curious if theres anny linux (x, KDE, Gnome) php editor with syntax
highliting and this things...

markus





One word: VIM !!!

If you want an editor for X - use gvim.

On Wed, Jan 10, 2001 at 02:50:53PM +0100, Markus H. Maussner wrote:
> hi..
> 
> ..i am curious if theres anny linux (x, KDE, Gnome) php editor with syntax
> highliting and this things...
> 
> markus
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Daniel Solin
System Engineer
Carambole Karlstad




"Markus H. Maussner" wrote:
> 
> hi..
> 
> ..i am curious if theres anny linux (x, KDE, Gnome) php editor with syntax
> highliting and this things...
> 

bluefish is quite nice.
http://bluefish.openoffice.nl/

-- 
Pavel a.k.a. Papi




Try Nedit.

        http://www.nedit.org

On 2001.01.10 13:50:53 +0000 Markus H. Maussner wrote:
> hi..
> 
> ..i am curious if theres anny linux (x, KDE, Gnome) php editor with
> syntax
> highliting and this things...
> 
> markus
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 

-- 

Thanks,
        William.





Markus H. Maussner wrote:
> ...i am curious if theres anny linux (x, KDE, Gnome) php editor with syntax
> highliting and this things...

emacs and xemacs shouldn't be forgotten here.

Wagner

-- 
One maniac alone can do what 20 together cannot




Editors are like hammers - once you get used to one, well that's what you 
use because you know how it behaves. For a Windows environment I'll endorse 
jeremy's recommendation of Ultraedit -- my hammer of choice. It offers some 
neat features: tons of macros and word files for various languages, 
multiple windows into same document, an easily used column mode that just 
great for picking a list of fields from one file and inserting into another.

Need hex? Click on the "H" button on the toolbar.

Need wordwrapping? There's a wrap button, and wraps can be soft or hard.

Need to change formatting between DOS and Unix/MAC? Click of a button.

For Linx, etc.? I don't have a hammer yet. I feel obligated to use VIM, but 
I cut my teeth on WordStar for CP/M so Joe is comfortable, but I'm leaning 
towards Jed. I find VIM very arcane, but if it's your hammer of choice, go 
for it.

And if you have the horsepower, in the Linux GUI there's Bluefish -- looks 
quite nice.

Finally, don't forget AMAYA, but you won't find and PHP add-ons.

Now, can we pick one and get back to work?

Cheers - Miles

PS I really liked yesterday's comment that " Real Programmers cat 
/dev/audio > myprog and hiss machine code into the mic". Kewl!! //mt

At 08:35 AM 01/10/2001 -0500, defender of the protocol wrote:
>the specialized editors for php are bs, you don't need an IDE to script 
>your web page or anything else for that matter
>
>http://www.ultraedit.com
>
>go get a copy of UltraEdit, download the wordfile for php syntax so it 
>highlights properly, and you're set
>
>http://www.ultraedit.com/downloads/additional.html
>
>i'm sure someone on this list has said this before
>
>- jeremy
>
>At 07:49 PM 1/9/2001, you wrote:
>
>> > I went to their homepage, and couldn't find a link to download
>> > the actual program, just some example stuff, and it says "coming
>> > soon"... Is it out there somewhere and I'm just retarded, or are
>> > you mob on a beta list or something???
>>
>>www.codecharge.com/download
>>
>>Their homepage is sort of hidden because it's still in beta.
>>Like in the version i downloaded the generated code gave a lot of PHP errors.
>>I understand they are working on it every day, sometimes it works, sometimes
>>not.
>>
>>Also my trial period was only 1 day due to some error.
>>
>>
>>Chris
>>
>>
>>
>>--------------------------------------------------------------------
>>--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
>>--------------------------------------------------------------------
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.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]







The editors that I usually use are Textpad and Jedit. I usually use Textpad
as it's my favorite editor. Jedit is very similar to Textpad which is why
it's my second favorite editor. The bonus of using Jedit is that it's
written entirely in Java so it also runs in Linux (quite well too). You can
download them both here:

http://www.textpad.com/
http://jedit.sourceforge.net/

They both provide color syntax highlighting for PHP (as well as just about
everything else) and both have loads of extra features (much like those of
UltraEdit). So if this is the sort of editor you're looking for these are
both worth a look see.

As far as Linux goes, Jedit is the only editor I've been able to find that
compares against something like Textpad or UltraEdit.

-Toby

----- Original Message -----
From: "Miles Thompson" <[EMAIL PROTECTED]>
To: "defender of the protocol" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 9:50 AM
Subject: Re: [PHP] looking for a PHP editor


> Editors are like hammers - once you get used to one, well that's what you
> use because you know how it behaves. For a Windows environment I'll
endorse
> jeremy's recommendation of Ultraedit -- my hammer of choice. It offers
some
> neat features: tons of macros and word files for various languages,
> multiple windows into same document, an easily used column mode that just
> great for picking a list of fields from one file and inserting into
another.
>
> Need hex? Click on the "H" button on the toolbar.
>
> Need wordwrapping? There's a wrap button, and wraps can be soft or hard.
>
> Need to change formatting between DOS and Unix/MAC? Click of a button.
>
> For Linx, etc.? I don't have a hammer yet. I feel obligated to use VIM,
but
> I cut my teeth on WordStar for CP/M so Joe is comfortable, but I'm leaning
> towards Jed. I find VIM very arcane, but if it's your hammer of choice, go
> for it.
>
> And if you have the horsepower, in the Linux GUI there's Bluefish -- looks
> quite nice.
>
> Finally, don't forget AMAYA, but you won't find and PHP add-ons.
>
> Now, can we pick one and get back to work?
>
> Cheers - Miles
>
> PS I really liked yesterday's comment that " Real Programmers cat
> /dev/audio > myprog and hiss machine code into the mic". Kewl!! //mt
>
> At 08:35 AM 01/10/2001 -0500, defender of the protocol wrote:
> >the specialized editors for php are bs, you don't need an IDE to script
> >your web page or anything else for that matter
> >
> >http://www.ultraedit.com
> >
> >go get a copy of UltraEdit, download the wordfile for php syntax so it
> >highlights properly, and you're set
> >
> >http://www.ultraedit.com/downloads/additional.html
> >
> >i'm sure someone on this list has said this before
> >
> >- jeremy
> >
> >At 07:49 PM 1/9/2001, you wrote:
> >
> >> > I went to their homepage, and couldn't find a link to download
> >> > the actual program, just some example stuff, and it says "coming
> >> > soon"... Is it out there somewhere and I'm just retarded, or are
> >> > you mob on a beta list or something???
> >>
> >>www.codecharge.com/download
> >>
> >>Their homepage is sort of hidden because it's still in beta.
> >>Like in the version i downloaded the generated code gave a lot of PHP
errors.
> >>I understand they are working on it every day, sometimes it works,
sometimes
> >>not.
> >>
> >>Also my trial period was only 1 day due to some error.
> >>
> >>
> >>Chris
> >>
> >>
> >>
> >>--------------------------------------------------------------------
> >>--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
> >>--------------------------------------------------------------------
> >>
> >>
> >>
> >>--
> >>PHP General Mailing List (http://www.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]





Toby Miller wrote:
> As far as Linux goes, Jedit is the only editor I've been able to find that
> compares against something like Textpad or UltraEdit.

It should be stated here that vi (vim, gvim) and emacs (xemacs) belong to a 
different class of editor.
If you know how to handle them (which may include learning a few words of 
lisp in the case of emacs), you have an extremely powerful editor that can do 
anything you want. This may not be an easy task, but it is no coincidence 
that especially programmers use these editors.

This is why they cannot really be compared with Textpad or Ultraedit.

Wagner

-- 
One maniac alone can do what 20 together cannot




Has anyone mentioned Bluefish?  I was using code crusader till I tried it
yesterday.  It blows away both jcc, emacs, xemacs, and gvim.
---Matt
On Wed, 10 Jan 2001, Toby Miller wrote:

> The editors that I usually use are Textpad and Jedit. I usually use Textpad
> as it's my favorite editor. Jedit is very similar to Textpad which is why
> it's my second favorite editor. The bonus of using Jedit is that it's
> written entirely in Java so it also runs in Linux (quite well too). You can
> download them both here:
> 
> http://www.textpad.com/
> http://jedit.sourceforge.net/
> 
> They both provide color syntax highlighting for PHP (as well as just about
> everything else) and both have loads of extra features (much like those of
> UltraEdit). So if this is the sort of editor you're looking for these are
> both worth a look see.
> 
> As far as Linux goes, Jedit is the only editor I've been able to find that
> compares against something like Textpad or UltraEdit.
> 
> -Toby
> 
> ----- Original Message -----
> From: "Miles Thompson" <[EMAIL PROTECTED]>
> To: "defender of the protocol" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Wednesday, January 10, 2001 9:50 AM
> Subject: Re: [PHP] looking for a PHP editor
> 
> 
> > Editors are like hammers - once you get used to one, well that's what you
> > use because you know how it behaves. For a Windows environment I'll
> endorse
> > jeremy's recommendation of Ultraedit -- my hammer of choice. It offers
> some
> > neat features: tons of macros and word files for various languages,
> > multiple windows into same document, an easily used column mode that just
> > great for picking a list of fields from one file and inserting into
> another.
> >
> > Need hex? Click on the "H" button on the toolbar.
> >
> > Need wordwrapping? There's a wrap button, and wraps can be soft or hard.
> >
> > Need to change formatting between DOS and Unix/MAC? Click of a button.
> >
> > For Linx, etc.? I don't have a hammer yet. I feel obligated to use VIM,
> but
> > I cut my teeth on WordStar for CP/M so Joe is comfortable, but I'm leaning
> > towards Jed. I find VIM very arcane, but if it's your hammer of choice, go
> > for it.
> >
> > And if you have the horsepower, in the Linux GUI there's Bluefish -- looks
> > quite nice.
> >
> > Finally, don't forget AMAYA, but you won't find and PHP add-ons.
> >
> > Now, can we pick one and get back to work?
> >
> > Cheers - Miles
> >
> > PS I really liked yesterday's comment that " Real Programmers cat
> > /dev/audio > myprog and hiss machine code into the mic". Kewl!! //mt
> >
> > At 08:35 AM 01/10/2001 -0500, defender of the protocol wrote:
> > >the specialized editors for php are bs, you don't need an IDE to script
> > >your web page or anything else for that matter
> > >
> > >http://www.ultraedit.com
> > >
> > >go get a copy of UltraEdit, download the wordfile for php syntax so it
> > >highlights properly, and you're set
> > >
> > >http://www.ultraedit.com/downloads/additional.html
> > >
> > >i'm sure someone on this list has said this before
> > >
> > >- jeremy
> > >
> > >At 07:49 PM 1/9/2001, you wrote:
> > >
> > >> > I went to their homepage, and couldn't find a link to download
> > >> > the actual program, just some example stuff, and it says "coming
> > >> > soon"... Is it out there somewhere and I'm just retarded, or are
> > >> > you mob on a beta list or something???
> > >>
> > >>www.codecharge.com/download
> > >>
> > >>Their homepage is sort of hidden because it's still in beta.
> > >>Like in the version i downloaded the generated code gave a lot of PHP
> errors.
> > >>I understand they are working on it every day, sometimes it works,
> sometimes
> > >>not.
> > >>
> > >>Also my trial period was only 1 day due to some error.
> > >>
> > >>
> > >>Chris
> > >>
> > >>
> > >>
> > >>--------------------------------------------------------------------
> > >>--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
> > >>--------------------------------------------------------------------
> > >>
> > >>
> > >>
> > >>--
> > >>PHP General Mailing List (http://www.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]
> 





On Wed, 10 Jan 2001 10:50:40 -0400, Miles Thompson
<[EMAIL PROTECTED]> wrote:

> For a Windows environment I'll endorse jeremy's recommendation
> of Ultraedit -- my hammer of choice.

Am I the only one using HoTMetal Pro 6.0 on Windows?

Its PHP support has a very annoying bug when it encounters embedded
HTML output contained within PHP standard tags, but using PHP long
tags fixes that problem.  Long tags help in other ways too, because
they make HoTMetaL format your PHP script text as-is, letting you
control indenting of the PHP text the way you want.

And as long as you're not trying to embed HTML output inside your PHP
tags, you can use PHP short tags in contexts where they make the most
sense, like printing the contents of a single variable:

  VALUE="<?=$cardtype?>"

Notice the omission of the "print" command.  That's a neat little
trick I learned from Matt Zandstra's book.  Very helpful for quick
output of a single variable.

One thing I can no longer live without, is HoTMetaL's integrated FTP
support.  It's so good, the FTP site becomes part of your desktop.

I can open a remote FTP file for some quick changes, without even
storing it locally on my hard drive.  And then just as quickly, save
it back to the FTP site with the touch of one toolbar button.

OTOH, after an editing session where I make extensive changes to the
local copy of my project, its FTP file synchronization is everything I
could ask for.

And did I mention its excellent support for different HTML views like
tags-on, WYSIWYG, and raw source?

Did I mention its excellent table design and manipulation facilities?

Did I mention its project management?

Did I mention ...

Yes I could go on and on.  You get a screwdriver and some wrenches
with your hammer.  It's available at Amazon, discounted to about $70.


Egan







On Wednesday 10 January 2001 15:50, Miles Thompson wrote:

> you use because you know how it behaves. For a Windows environment I'll
> endorse jeremy's recommendation of Ultraedit -- my hammer of choice. It

seconded.

> For Linx, etc.? I don't have a hammer yet. I feel obligated to use VIM,

My personal favourite is fte. Its only problem is that it doesn't have 
real PHP highlighting, but I got used to switching between HTML and C 
mode...

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

Those who will not reason, are bigots,
those who cannot, are fools,
and those who dare not, are slaves.

- George Gordon Noel Byron (1788-1824), [Lord Byron]




Personally, my team and I use HomeSite 4.5.x from Allaire.  It is PHP aware
and there are extensions you can add to allow PHP expression building. I
have used it for a coupe of years and fills my text building personality as
well as the graphical GUI ones with DW and browsing.

If you use DreamWeaver (DW), it usually comes as a freebie.

--Dave 

-----Original Message-----
From: Egan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 9:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] looking for a PHP editor


On Wed, 10 Jan 2001 10:50:40 -0400, Miles Thompson
<[EMAIL PROTECTED]> wrote:

> For a Windows environment I'll endorse jeremy's recommendation
> of Ultraedit -- my hammer of choice.

Am I the only one using HoTMetal Pro 6.0 on Windows?

Its PHP support has a very annoying bug when it encounters embedded
HTML output contained within PHP standard tags, but using PHP long
tags fixes that problem.  Long tags help in other ways too, because
they make HoTMetaL format your PHP script text as-is, letting you
control indenting of the PHP text the way you want.

And as long as you're not trying to embed HTML output inside your PHP
tags, you can use PHP short tags in contexts where they make the most
sense, like printing the contents of a single variable:

  VALUE="<?=$cardtype?>"

Notice the omission of the "print" command.  That's a neat little
trick I learned from Matt Zandstra's book.  Very helpful for quick
output of a single variable.

One thing I can no longer live without, is HoTMetaL's integrated FTP
support.  It's so good, the FTP site becomes part of your desktop.

I can open a remote FTP file for some quick changes, without even
storing it locally on my hard drive.  And then just as quickly, save
it back to the FTP site with the touch of one toolbar button.

OTOH, after an editing session where I make extensive changes to the
local copy of my project, its FTP file synchronization is everything I
could ask for.

And did I mention its excellent support for different HTML views like
tags-on, WYSIWYG, and raw source?

Did I mention its excellent table design and manipulation facilities?

Did I mention its project management?

Did I mention ...

Yes I could go on and on.  You get a screwdriver and some wrenches
with your hammer.  It's available at Amazon, discounted to about $70.


Egan




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




What extensions and where can you get them?

Cal
http://www.calevans.com

p.s. love homesite use it for everything from HTML to Java to php.


-----Original Message-----
From: Wacks, David [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 10:59 AM
To: 'Egan'; [EMAIL PROTECTED]
Subject: RE: [PHP] looking for a PHP editor


Personally, my team and I use HomeSite 4.5.x from Allaire.  It is PHP aware
and there are extensions you can add to allow PHP expression building. I
have used it for a coupe of years and fills my text building personality as
well as the graphical GUI ones with DW and browsing.

If you use DreamWeaver (DW), it usually comes as a freebie.

--Dave 

-----Original Message-----
From: Egan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 9:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] looking for a PHP editor


On Wed, 10 Jan 2001 10:50:40 -0400, Miles Thompson
<[EMAIL PROTECTED]> wrote:

> For a Windows environment I'll endorse jeremy's recommendation
> of Ultraedit -- my hammer of choice.

Am I the only one using HoTMetal Pro 6.0 on Windows?

Its PHP support has a very annoying bug when it encounters embedded
HTML output contained within PHP standard tags, but using PHP long
tags fixes that problem.  Long tags help in other ways too, because
they make HoTMetaL format your PHP script text as-is, letting you
control indenting of the PHP text the way you want.

And as long as you're not trying to embed HTML output inside your PHP
tags, you can use PHP short tags in contexts where they make the most
sense, like printing the contents of a single variable:

  VALUE="<?=$cardtype?>"

Notice the omission of the "print" command.  That's a neat little
trick I learned from Matt Zandstra's book.  Very helpful for quick
output of a single variable.

One thing I can no longer live without, is HoTMetaL's integrated FTP
support.  It's so good, the FTP site becomes part of your desktop.

I can open a remote FTP file for some quick changes, without even
storing it locally on my hard drive.  And then just as quickly, save
it back to the FTP site with the touch of one toolbar button.

OTOH, after an editing session where I make extensive changes to the
local copy of my project, its FTP file synchronization is everything I
could ask for.

And did I mention its excellent support for different HTML views like
tags-on, WYSIWYG, and raw source?

Did I mention its excellent table design and manipulation facilities?

Did I mention its project management?

Did I mention ...

Yes I could go on and on.  You get a screwdriver and some wrenches
with your hammer.  It's available at Amazon, discounted to about $70.


Egan




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

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






On Wed, 10 Jan 2001 09:58:34 -0700, "Wacks, David"
<[EMAIL PROTECTED]> wrote:

>Personally, my team and I use HomeSite 4.5.x from Allaire.

You did not mention the price (compared to HoTMetaL at $70).


Egan







> >Personally, my team and I use HomeSite 4.5.x from Allaire.
> 
> You did not mention the price (compared to HoTMetaL at $70).

my two cents on price.  who cares!  if an editor makes one happy then pay
as much as it takes to get it.  consider how many hours are spent with the
editor.  18 hours a day?  in the end, what's $20?  $200?  homesite is
about $90.

oh btw, i use homesite and vim , and vim is free! :)

philip





> > >Personally, my team and I use HomeSite 4.5.x from Allaire.
> > You did not mention the price (compared to HoTMetaL at $70).
> my two cents on price.  who cares!  if an editor makes one 
> happy then pay as much as it takes to get it.  consider how many 
> hours are spent with the editor.  18 hours a day?  in the end, what's 
> $20?  $200?  homesite is about $90.
> oh btw, i use homesite and vim , and vim is free! :)

Plus, Homesite has project management and can interface 
with source control applications (we use VSS) whereas I 
believe HoTMetaL does not.  I don't particularly like Homesite
(there are many things I despise about it, as a matter of fact),
but it's the only one that I know of (on a windows OS) that has
these features.  If there were another, I think I'd probably switch
in a heartbeat.

Chris




On Wed, 10 Jan 2001 17:54:07 +0000 (GMT), Philip Olson
<[EMAIL PROTECTED]> wrote:

>> >Personally, my team and I use HomeSite 4.5.x from Allaire.
>> 
>> You did not mention the price (compared to HoTMetaL at $70).
>
>my two cents on price.  who cares!

>philip

No need to get ballistic.  I just wanted to know if its price is in a
range where I might consider it at some future time.

I chose HoTMetaL after briefly considering a few products.  I didn't
have time to undertake an in-depth analysis of every HTML product on
the market.  More than anything else, I needed to get up and running
quickly, having had very little HTML experience myself.

So far, HoTMetaL has provided everything I need.  But as my experience
grows, perhaps my needs will too.

Relax.  This work is not hard!

:-)


Egan






agreed, 4.5.2 still contains pretty old bugs.
UltraEdit is bugfree (at least I haven't encountered any), has 
project management capabilities (but cannot make use of a 
version control system, AFAIK).

At 18:59 10.1. 2001, Boget, Chris wrote the following:
-------------------------------------------------------------- 
>> > >Personally, my team and I use HomeSite 4.5.x from Allaire.
>> > You did not mention the price (compared to HoTMetaL at $70).
>> my two cents on price.  who cares!  if an editor makes one 
>> happy then pay as much as it takes to get it.  consider how many 
>> hours are spent with the editor.  18 hours a day?  in the end, what's 
>> $20?  $200?  homesite is about $90.
>> oh btw, i use homesite and vim , and vim is free! :)
>
>Plus, Homesite has project management and can interface 
>with source control applications (we use VSS) whereas I 
>believe HoTMetaL does not.  I don't particularly like Homesite
>(there are many things I despise about it, as a matter of fact),
>but it's the only one that I know of (on a windows OS) that has
>these features.  If there were another, I think I'd probably switch
>in a heartbeat.
>
>Chris
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






> agreed, 4.5.2 still contains pretty old bugs.
> UltraEdit is bugfree (at least I haven't encountered any), has 
> project management capabilities (but cannot make use of a 
> version control system, AFAIK).

And that is definitely the most important feature I need,
unfortunately...

Chris




Cynic,

I've never used version control -- other than saving as draft1, draft2, 
draft3 -- and there have been days I've wanted draft2.5. Is this something 
integral to the editor, or would a tool like CVS work?

Versioning would be *good*.

Miles

At 07:26 PM 01/10/2001 +0100, Cynic wrote:
>agreed, 4.5.2 still contains pretty old bugs.
>UltraEdit is bugfree (at least I haven't encountered any), has
>project management capabilities (but cannot make use of a
>version control system, AFAIK).
>
>At 18:59 10.1. 2001, Boget, Chris wrote the following:
>--------------------------------------------------------------
> >> > >Personally, my team and I use HomeSite 4.5.x from Allaire.
> >> > You did not mention the price (compared to HoTMetaL at $70).
> >> my two cents on price.  who cares!  if an editor makes one
> >> happy then pay as much as it takes to get it.  consider how many
> >> hours are spent with the editor.  18 hours a day?  in the end, what's
> >> $20?  $200?  homesite is about $90.
> >> oh btw, i use homesite and vim , and vim is free! :)
> >
> >Plus, Homesite has project management and can interface
> >with source control applications (we use VSS) whereas I
> >believe HoTMetaL does not.  I don't particularly like Homesite
> >(there are many things I despise about it, as a matter of fact),
> >but it's the only one that I know of (on a windows OS) that has
> >these features.  If there were another, I think I'd probably switch
> >in a heartbeat.
> >
> >Chris
>------end of quote------
>
>
>
>____________________________________________________________
>Cynic:
>
>A member of a group of ancient Greek philosophers who taught
>that virtue constitutes happiness and that self control is
>the essential part of virtue.
>
>[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]








Agreed on the annoying homesite bugs, like with FTP.  UltraEdit is nice
too, haven't spent enough time with it.

Now only if a php-tidy existed ...

Philip

On Wed, 10 Jan 2001, Cynic wrote:

> agreed, 4.5.2 still contains pretty old bugs.
> UltraEdit is bugfree (at least I haven't encountered any), has 
> project management capabilities (but cannot make use of a 
> version control system, AFAIK).
> 
> At 18:59 10.1. 2001, Boget, Chris wrote the following:
> -------------------------------------------------------------- 
> >> > >Personally, my team and I use HomeSite 4.5.x from Allaire.
> >> > You did not mention the price (compared to HoTMetaL at $70).
> >> my two cents on price.  who cares!  if an editor makes one 
> >> happy then pay as much as it takes to get it.  consider how many 
> >> hours are spent with the editor.  18 hours a day?  in the end, what's 
> >> $20?  $200?  homesite is about $90.
> >> oh btw, i use homesite and vim , and vim is free! :)
> >
> >Plus, Homesite has project management and can interface 
> >with source control applications (we use VSS) whereas I 
> >believe HoTMetaL does not.  I don't particularly like Homesite
> >(there are many things I despise about it, as a matter of fact),
> >but it's the only one that I know of (on a windows OS) that has
> >these features.  If there were another, I think I'd probably switch
> >in a heartbeat.
> >
> >Chris
> ------end of quote------ 
> 
> 
> 
> ____________________________________________________________
> Cynic:
> 
> A member of a group of ancient Greek philosophers who taught
> that virtue constitutes happiness and that self control is
> the essential part of virtue.
> 
> [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]
> 






you can surely use CVS or VSS or RCS or something like that. 
the point here is whether you can use such a system from an 
editor seamlessly, which you can't in the case of UltraEdit, 
but can with HomeSite.

At 19:32 10.1. 2001, Miles Thompson wrote the following:
-------------------------------------------------------------- 
>Cynic,
>
>I've never used version control -- other than saving as draft1, draft2, draft3 -- and 
>there have been days I've wanted draft2.5. Is this something integral to the editor, 
>or would a tool like CVS work?
>
>Versioning would be *good*.
>
>Miles
>
>At 07:26 PM 01/10/2001 +0100, Cynic wrote:
>>agreed, 4.5.2 still contains pretty old bugs.
>>UltraEdit is bugfree (at least I haven't encountered any), has
>>project management capabilities (but cannot make use of a
>>version control system, AFAIK).
>>
>>At 18:59 10.1. 2001, Boget, Chris wrote the following:
>>--------------------------------------------------------------
>>>> > >Personally, my team and I use HomeSite 4.5.x from Allaire.
>>>> > You did not mention the price (compared to HoTMetaL at $70).
>>>> my two cents on price.  who cares!  if an editor makes one
>>>> happy then pay as much as it takes to get it.  consider how many
>>>> hours are spent with the editor.  18 hours a day?  in the end, what's
>>>> $20?  $200?  homesite is about $90.
>>>> oh btw, i use homesite and vim , and vim is free! :)
>>>
>>>Plus, Homesite has project management and can interface
>>>with source control applications (we use VSS) whereas I
>>>believe HoTMetaL does not.  I don't particularly like Homesite
>>>(there are many things I despise about it, as a matter of fact),
>>>but it's the only one that I know of (on a windows OS) that has
>>>these features.  If there were another, I think I'd probably switch
>>>in a heartbeat.
>>>
>>>Chris
>>------end of quote------
>>
>>
>>
>>____________________________________________________________
>>Cynic:
>>
>>A member of a group of ancient Greek philosophers who taught
>>that virtue constitutes happiness and that self control is
>>the essential part of virtue.
>>
>>[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]
>
>
>
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






> Now only if a php-tidy existed ...

Agreed.  I've often thought about hacking 'indent' to recognice PHP
syntax, but I never get around to it.  Does anyone know if someone has
done this already?

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "<body>"   -- Quoted from Yahoo! homepage, http://www.yahoo.com





I mailed the author of UltraEdit, and he responded within 10
minutes, so I'm forwarding the reply. It turns out you _can_ 
actually make use of a version control system from within UE:

>There is a link on our Products page to Component Software's 
>RCS version control software - http://www.idmcomp.com/products/ 
>. You can read about integrating this with UltraEdit-32 at 
>http://www.componentsoftware.com/csrcs/addons/ue32.htm .
>Also, although we don't use Visual SourceSafe ourselves, one 
>user told us he was able to integrate VSS with UltraEdit-32 by 
>configuring the following tools:
>
>Visual SoureSafe 
>1. Advanced - Tool Configuration 
>>From Tool Configuration
>Command Line: ss.exe checkout %n%e -GWR 
>Working Directory: [E]:\PROGRAM FILES\MICROSOFT VISUAL 
>STUDIO\COMMON\VSS\WIN32\ 
>Command Output [Replace Existing]
>Same for checking in the file, except change checkout to checkin! 
>You can then add these tools to the toolbar.



At 19:38 10.1. 2001, Philip Olson wrote the following:
-------------------------------------------------------------- 

>Agreed on the annoying homesite bugs, like with FTP.  UltraEdit is nice
>too, haven't spent enough time with it.
>
>Now only if a php-tidy existed ...
>
>Philip
>
>On Wed, 10 Jan 2001, Cynic wrote:
>
>> agreed, 4.5.2 still contains pretty old bugs.
>> UltraEdit is bugfree (at least I haven't encountered any), has 
>> project management capabilities (but cannot make use of a 
>> version control system, AFAIK).
>> 
>> At 18:59 10.1. 2001, Boget, Chris wrote the following:
>> -------------------------------------------------------------- 
>> >> > >Personally, my team and I use HomeSite 4.5.x from Allaire.
>> >> > You did not mention the price (compared to HoTMetaL at $70).
>> >> my two cents on price.  who cares!  if an editor makes one 
>> >> happy then pay as much as it takes to get it.  consider how many 
>> >> hours are spent with the editor.  18 hours a day?  in the end, what's 
>> >> $20?  $200?  homesite is about $90.
>> >> oh btw, i use homesite and vim , and vim is free! :)
>> >
>> >Plus, Homesite has project management and can interface 
>> >with source control applications (we use VSS) whereas I 
>> >believe HoTMetaL does not.  I don't particularly like Homesite
>> >(there are many things I despise about it, as a matter of fact),
>> >but it's the only one that I know of (on a windows OS) that has
>> >these features.  If there were another, I think I'd probably switch
>> >in a heartbeat.
>> >
>> >Chris
>> ------end of quote------ 
>> 
>> 
>> 
>> ____________________________________________________________
>> Cynic:
>> 
>> A member of a group of ancient Greek philosophers who taught
>> that virtue constitutes happiness and that self control is
>> the essential part of virtue.
>> 
>> [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]
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]







Ultraedit is great. To make UltraEdit "php friendly",
if you goto: Advanced->toolconfiguration
set:
Command line to: c:\php\php -e -f %F (assumes php installed at c:\php\)
Working dir    : c:\php              (whatever, that's just what I use)
Menu Item Name : Php                     (ditto)

check:
Replace existing file
Capture output

then, after you run the Php tool (Advanced->Php, or, set up a button on the
tool bar), you can just click "View file in browser" to view the output in
HTML.

BTW I'm using UltraEdit 8.0, and I added the php syntax to my wordfile(link
below)


> -----Original Message-----
> From: defender of the protocol [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 5:35 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] looking for a PHP editor
>
>
> the specialized editors for php are bs, you don't need an IDE to script
> your web page or anything else for that matter
>
> http://www.ultraedit.com
>
> go get a copy of UltraEdit, download the wordfile for php syntax so it
> highlights properly, and you're set
>
> http://www.ultraedit.com/downloads/additional.html
>
> i'm sure someone on this list has said this before
>
> - jeremy>





html-kit... gets the job done. excellent support for a ton of languages.


----- Original Message -----
From: Cynic <[EMAIL PROTECTED]>
To: Philip Olson <[EMAIL PROTECTED]>
Cc: Boget, Chris <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 6:47 PM
Subject: RE: [PHP] looking for a PHP editor


> I mailed the author of UltraEdit, and he responded within 10
> minutes, so I'm forwarding the reply. It turns out you _can_
> actually make use of a version control system from within UE:
>
> >There is a link on our Products page to Component Software's
> >RCS version control software - http://www.idmcomp.com/products/
> >. You can read about integrating this with UltraEdit-32 at
http://www.componentsoftware.com/csrcs/addons/ue32.htm .
> >Also, although we don't use Visual SourceSafe ourselves, one
> >user told us he was able to integrate VSS with UltraEdit-32 by
> >configuring the following tools:
> >
> >Visual SoureSafe
> >1. Advanced - Tool Configuration
> >>From Tool Configuration
> >Command Line: ss.exe checkout %n%e -GWR
> >Working Directory: [E]:\PROGRAM FILES\MICROSOFT VISUAL
> >STUDIO\COMMON\VSS\WIN32\
> >Command Output [Replace Existing]
> >Same for checking in the file, except change checkout to checkin!
> >You can then add these tools to the toolbar.
>
>
>
> At 19:38 10.1. 2001, Philip Olson wrote the following:
> --------------------------------------------------------------
>
> >Agreed on the annoying homesite bugs, like with FTP.  UltraEdit is nice
> >too, haven't spent enough time with it.
> >
> >Now only if a php-tidy existed ...
> >
> >Philip
> >
> >On Wed, 10 Jan 2001, Cynic wrote:
> >
> >> agreed, 4.5.2 still contains pretty old bugs.
> >> UltraEdit is bugfree (at least I haven't encountered any), has
> >> project management capabilities (but cannot make use of a
> >> version control system, AFAIK).
> >>
> >> At 18:59 10.1. 2001, Boget, Chris wrote the following:
> >> --------------------------------------------------------------
> >> >> > >Personally, my team and I use HomeSite 4.5.x from Allaire.
> >> >> > You did not mention the price (compared to HoTMetaL at $70).
> >> >> my two cents on price.  who cares!  if an editor makes one
> >> >> happy then pay as much as it takes to get it.  consider how many
> >> >> hours are spent with the editor.  18 hours a day?  in the end,
what's
> >> >> $20?  $200?  homesite is about $90.
> >> >> oh btw, i use homesite and vim , and vim is free! :)
> >> >
> >> >Plus, Homesite has project management and can interface
> >> >with source control applications (we use VSS) whereas I
> >> >believe HoTMetaL does not.  I don't particularly like Homesite
> >> >(there are many things I despise about it, as a matter of fact),
> >> >but it's the only one that I know of (on a windows OS) that has
> >> >these features.  If there were another, I think I'd probably switch
> >> >in a heartbeat.
> >> >
> >> >Chris
> >> ------end of quote------
> >>
> >>
> >>
> >> ____________________________________________________________
> >> Cynic:
> >>
> >> A member of a group of ancient Greek philosophers who taught
> >> that virtue constitutes happiness and that self control is
> >> the essential part of virtue.
> >>
> >> [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]
> ------end of quote------
>
>
>
> ____________________________________________________________
> Cynic:
>
> A member of a group of ancient Greek philosophers who taught
> that virtue constitutes happiness and that self control is
> the essential part of virtue.
>
> [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]
>
>





defender of the protocol ...
> the specialized editors for php are bs, you don't need an IDE to script
> your web page or anything else for that matter
>
> http://www.ultraedit.com
>
> go get a copy of UltraEdit, download the wordfile for php syntax so it
> highlights properly, and you're set
>
> http://www.ultraedit.com/downloads/additional.html
>
> i'm sure someone on this list has said this before

Mmmmppppfff... ultraedit's wordlist file still lacks the color of allaire's homesite - 
it does detect which parts of the .php file
are HTML and what parts of the file are PHP code, and colours syntax very well...








MR wrote:
> Mmmmppppfff... ultraedit's wordlist file still lacks the color of
> allaire's homesite - it does detect which parts of the .php file are
> HTML and what parts of the file are PHP code, and colours syntax very
> well...

Who needs that? Nesting PHP in HTML is bad style, IMHO.
Just because it is possible, 

-- 
Sanity is calming, but madness is more interesting.





Alexander Wagner wrote:
> Who needs that? Nesting PHP in HTML is bad style, IMHO.
> Just because it is possible,

... is no reason to do it, I wanted to say.

*whistle*
Wagner

-- 
Sanity is calming, but madness is more interesting.




Come on... mixing PHP and HTML in the same file isn't bad
style... in fact it can make things easier to read, if you
do it right.

This is one of PHP's biggest features... otherwise we'd just
have another Perl...

...my .02...

--Toby

----- Original Message -----
From: "Alexander Wagner" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 6:04 PM
Subject: Re: [PHP] looking for a PHP editor


> Alexander Wagner wrote:
> > Who needs that? Nesting PHP in HTML is bad style, IMHO.
> > Just because it is possible,
>
> ... is no reason to do it, I wanted to say.
>
> *whistle*
> Wagner
>
> --
> Sanity is calming, but madness is more interesting.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>
>






Hello Alexander, 

(AW == "Alexander Wagner") [EMAIL PROTECTED] writes:

>> Mmmmppppfff... ultraedit's wordlist file still lacks the color of
>> allaire's homesite - it does detect which parts of the .php file
>> are HTML and what parts of the file are PHP code, and colours
>> syntax very well...

AW> Who needs that? Nesting PHP in HTML is bad style, IMHO.

Bad style?!

You _actually_ print() or echo() everything you want to send to the
browser?

If it doesn't need to be interpolated by PHP, why print() it?

-Brian
--
Life may have no meaning, or, even worse,
it may have a meaning of which you disapprove.






Greetings,

Any efficient ideas how to make any number readable by adding comma's?

i.e. 3000000  ==>  3,000,000

Thanks,

-- Tim Wells


----------------------------------------------------------------------
 Timothy G. Wells, CEO                    Good News Internet Services
 [EMAIL PROTECTED]                       http://www.goodnews.net 
 voice 513-662-4443 x 11                             fax 513-662-8461

          Everything You Need To Succeed On the Internet





number_format()

At 14:16 10.1. 2001, Timothy G. Wells wrote the following:
-------------------------------------------------------------- 
>Greetings,
>
>Any efficient ideas how to make any number readable by adding comma's?
>
>i.e. 3000000  ==>  3,000,000
>
>Thanks,
>
>-- Tim Wells
>
>
>----------------------------------------------------------------------
> Timothy G. Wells, CEO                    Good News Internet Services
> [EMAIL PROTECTED]                       http://www.goodnews.net 
> voice 513-662-4443 x 11                             fax 513-662-8461
>
>          Everything You Need To Succeed On the Internet
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






hi..

is there a solution how i can get all iptc fields out of an immage ?

i tried the 'iptcparse' command wich works quiet well.. just that anny
commas are taken out..
like from the original field 
'red,dog,cat' i just get
'cat' or like
'this, i want to show' returns
'i want to show'

for anny hints i am thankfull

markus





On Wed, Jan 10, 2001 at 02:31:48PM +0100, Markus H. Maussner wrote:
> hi..
> 
> is there a solution how i can get all iptc fields out of an immage ?
> 
> i tried the 'iptcparse' command wich works quiet well.. just that anny
> commas are taken out..
> like from the original field 
> 'red,dog,cat' i just get
> 'cat' or like
> 'this, i want to show' returns
> 'i want to show'
> 
> for anny hints i am thankfull

    plz send me a small sample image. i'm pretty sure iptcparse
    doesn't do that - but who knows;-)

    tc




I think that above GD1.3 Gif is no longer supported, you have to switch
to PNG.

Cheers,

Al


Dan Harrington wrote:
> 
> Hello all,
> 
> I've installed: libpng-1.08, tiff-v3.5.5, zlib-1.1.3, freetype-2.0,
> pdflib-3.03, and gd-1.8.3
> reconfigured ldconfig, and I configured with:
> 
> ./configure --with-apache=../apache_1.3.12 --enable-gd-imgstrttf --with-gd=.
> ./gd-1.8.3 \
> --with-jpeg-dir --with-zlib-dir --with-png-dir --with-tiff-dir --with-pgsql
> --with-zlib
> 
> and now I get:
> 
> gcc  -I. -I/usr/local/src/php-4.0.4/ext/gd -I/usr/local/src/php-4.0.4/main -
> I/us
> r/local/src/php-4.0.4 -I/usr/local/src/apache_1.3.12/src/include -I/usr/loca
> l/sr
> c/apache_1.3.12/src/os/unix -I/usr/local/src/php-4.0.4/Zend -I/usr/local/src
> /gd-
> 1.8.3 -I/usr/local/src/php-4.0.4/ext/mysql/libmysql -I/usr/local/src/php-4.0
> .4/e
> xt/xml/expat/xmltok -I/usr/local/src/php-4.0.4/ext/xml/expat/xmlparse -I/usr
> /loc
> al/src/php-4.0.4/TSRM  -DXML_BYTE_ORDER=12 -g -O2  -c gd.c && touch gd.lo
> 
> gd.c: In function `php_if_imagecreatefromgif':
> gd.c:703: `gdImageCreateFromGif' undeclared (first use in this function)
> gd.c:703: (Each undeclared identifier is reported only once
> gd.c:703: for each function it appears in.)
> gd.c: In function `php_if_imagegif':
> gd.c:862: `gdImageGif' undeclared (first use in this function)
> 
> I thought that all my includes were correct.  What's going on?
> Thank you
> Dan Harrington
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




I have an application that stores large text fields in MS SQL SVR and when
they are entered on-line everything works fine.  The problem begins when I
try to retrieve them from the database and populate a field on the php3
on-line form.  The query will only return the first 4096 byte of the
information in the data base field.

I have been told there is a work around, but don't know where to find it.
Splitting the field up in to smaller chunks is not an option.

Can anyone help me with this problem.

Thanks
PaulL





I am using MySQL (dont think im a MySQL preacher, im not) and Ive used
LONGBLOBS to store 100K+ binary images and sucessfully retreaved them, no
problem. I almost wonder if the problem is in the fieldtype in MSSQL? is it
set to LONGBLOB ? MSSQL might not even have such a field (postgres's largest
field I *think* is 4k). the only solution I can think of in such a case is
to store a unique filename in the field to reference the data from a file.
You could split the data up into 4k chucks using

<?
    $data = chunk_split($date, 4096, '||||||||||');
    $data = explode('||||||||||', $data);
?>

I dont know if this is the best idea, but it may work, you would then of
course have to retreave X number of fields and peice the data together
again...

Chris Lee
Mediawaveonline.com



""Paul Lewis"" <[EMAIL PROTECTED]> wrote in message
007d01c07b0a$abfda4b0$[EMAIL PROTECTED]">news:007d01c07b0a$abfda4b0$[EMAIL PROTECTED]...
> I have an application that stores large text fields in MS SQL SVR and when
> they are entered on-line everything works fine.  The problem begins when I
> try to retrieve them from the database and populate a field on the php3
> on-line form.  The query will only return the first 4096 byte of the
> information in the data base field.
>
> I have been told there is a work around, but don't know where to find it.
> Splitting the field up in to smaller chunks is not an option.
>
> Can anyone help me with this problem.
>
> Thanks
> PaulL
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi,

is there a shorter way to do:

while (list($key, $value) = each($my_array))
{
        echo $value...
}

I just need the value!

Thanks,
Mo.




while( list( , $value ) = each( $my_array) )
or
foreach( $my_array as $value ) 


At 16:16 10.1. 2001, Moritz Petersen wrote the following:
-------------------------------------------------------------- 
>Hi,
>
>is there a shorter way to do:
>
>while (list($key, $value) = each($my_array))
>{
>        echo $value...
>}
>
>I just need the value!
>
>Thanks,
>Mo.
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






Moritz Petersen wrote:
> is there a shorter way to do:
>
> while (list($key, $value) = each($my_array))
> {
>       echo $value...
> }
>
> I just need the value!

PHP3:
while (list(, $value) = each($my_array))
{
         echo $value...
}

PHP4:
foreach ($my_array as $value)
{
        echo $value...
}

manual/control-structures.foreach.php

Wagner

-- 
One maniac alone can do what 20 together cannot




That's it. Thank you!

> -----Original Message-----
> From: Alexander Wagner [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 4:17 PM
> To: Php-General@Lists. Php. Net
> Subject: Re: [PHP] Shorter way for "each"
> 
> 
> Moritz Petersen wrote:
> > is there a shorter way to do:
> >
> > while (list($key, $value) = each($my_array))
> > {
> >     echo $value...
> > }
> >
> > I just need the value!
> 
> PHP3:
> while (list(, $value) = each($my_array))
> {
>          echo $value...
> }
> 
> PHP4:
> foreach ($my_array as $value)
> {
>       echo $value...
> }
> 
> manual/control-structures.foreach.php
> 
> Wagner
> 
> -- 
> One maniac alone can do what 20 together cannot
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 




everyone allready posted about foreach(), but they didnt post the
alternative syntax

foreach ($array as $position => $value)
{
    echo $postition : $value<br>\n";
}

http://www.php.net/manual/control-structures.foreach.php

Chris Lee
Mediawaveonline.com




""Moritz Petersen"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> is there a shorter way to do:
>
> while (list($key, $value) = each($my_array))
> {
> echo $value...
> }
>
> I just need the value!
>
> Thanks,
> Mo.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






hiya

echo implode (' ', $array);

greetz,

Wico

At 08:24 10-1-01 -0800, Chris Lee wrote:
>everyone allready posted about foreach(), but they didnt post the
>alternative syntax
>
>foreach ($array as $position => $value)
>{
>     echo $postition : $value<br>\n";
>}
>
>http://www.php.net/manual/control-structures.foreach.php
>
>Chris Lee
>Mediawaveonline.com
>
>
>
>
>""Moritz Petersen"" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi,
> >
> > is there a shorter way to do:
> >
> > while (list($key, $value) = each($my_array))
> > {
> > echo $value...
> > }
> >
> > I just need the value!
> >
> > Thanks,
> > Mo.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]





Hey Wico,


> echo implode (' ', $array);

this is quite a cool idea! For example

echo "<option>" . implode("</option><option>", $my_array) . "</option>";

would save some time, printing out an select-group...

Thanks a lot, also to all other people, who helped me.

Mo.




Hi,

I am searching for detailed information about persistent connection. I've
looked at all the web sites just for "persistent" word but always I found
the same information. All the time people are saying "persistent connection
is good if you are dealing with lots of small queries".

Here is my case: This week I've upgraded necessary server software to the
latest versions of Php and Apache (Php 4.04 and Apache 1.3.14) As I did
before upgrade I've compiled Php as an Apache Static Module ( mod_so is not
necessary ) And check MySQL for persistent connection. My site is focused on
free web services like graphic counter, polls, url redirection, webring and
news syndication to personal web sites. (www.kelalaka.net, it is Turkish
only). Only for graphic counter services, it counts 180.000+ hits per day.
It means 350.000+ queries per day. Day average is 250 query , 60 connection
per minute, but in popular hours it is very high and MySQL server gives "Too
many connections" errors. MySQL server is default and set to 100 connection
at most.

Yesterday I ordered more ram in order to increase connection number of MySQL
from 100 to 200+ connection. But today I realized that my server wasn't work
with persistent connection.
All the Php code contains mysql_pconnect for MySQL connections. Apache and
Php works in module type not in cgi mode. I've looked at phpinfo() in order
to see anything that can indicate status of persistent connection.  It says
"mysql.allow_persistent is On". But again in phpinfo it says "Active
Persistent Links 1" . It is sometime changes to "0". In MySQL I am looking
for active processess by using "mysql" and "show processlist" commands it
shows me 100 active links but most of them are in sleep state. In php.ini
there is a line in order to set maximum number of persistent connection and
I set it to just 25.
If somebody uses mysql_pconnect's instead of mysql_connect in Php cgi mode,
he doesn't see any error messages. All mysql_pconnects work like
mysql_connect.

My questions :
1 - How can users exactly determine whether they are using Php as a module
or cgi mode? (from phpinfo or ..?)
2 - Is it sufficient Php and Apache compiled in static or dynamic module
version in order to use mysql_pconnects in Php code? Anything to do with
MySQL?
3 - In a Apache + Php module compiled system is it normal to reach more than
predefined connection number in php.ini? (100 active connection but 25
defined in php.ini. In phpinfo shows same settings in the php.ini file (it
shows 25 max persistent connection))
4 - Is there any web page containing a real how-to and tutorial about
persistent connection? (If not I will certainly prepare one in a few weeks
:-))

Any kind of help will be appreciated...


Kayra Otaner
www.kelalaka.net








In your Apache httpd.conf, do you have the line

KeepAlive On

- this is the Apache directive to turn on persistent connections. You will
also want to play with the MaxKeepAliveRequests directive, if you set it to
0 then it will allow an unlimited number of connections. 

There may be more to it than this, but it's worth checking.

HTH
Jon



-----Original Message-----
From: Kayra Otaner [mailto:[EMAIL PROTECTED]]
Sent: 10 January 2001 15:32
To: [EMAIL PROTECTED]
Subject: [PHP] to be persistent connected or not to be persistent
connected


Hi,

I am searching for detailed information about persistent connection. I've
looked at all the web sites just for "persistent" word but always I found
the same information. All the time people are saying "persistent connection
is good if you are dealing with lots of small queries".

Here is my case: This week I've upgraded necessary server software to the
latest versions of Php and Apache (Php 4.04 and Apache 1.3.14) As I did
before upgrade I've compiled Php as an Apache Static Module ( mod_so is not
necessary ) And check MySQL for persistent connection. My site is focused on
free web services like graphic counter, polls, url redirection, webring and
news syndication to personal web sites. (www.kelalaka.net, it is Turkish
only). Only for graphic counter services, it counts 180.000+ hits per day.
It means 350.000+ queries per day. Day average is 250 query , 60 connection
per minute, but in popular hours it is very high and MySQL server gives "Too
many connections" errors. MySQL server is default and set to 100 connection
at most.

Yesterday I ordered more ram in order to increase connection number of MySQL
from 100 to 200+ connection. But today I realized that my server wasn't work
with persistent connection.
All the Php code contains mysql_pconnect for MySQL connections. Apache and
Php works in module type not in cgi mode. I've looked at phpinfo() in order
to see anything that can indicate status of persistent connection.  It says
"mysql.allow_persistent is On". But again in phpinfo it says "Active
Persistent Links 1" . It is sometime changes to "0". In MySQL I am looking
for active processess by using "mysql" and "show processlist" commands it
shows me 100 active links but most of them are in sleep state. In php.ini
there is a line in order to set maximum number of persistent connection and
I set it to just 25.
If somebody uses mysql_pconnect's instead of mysql_connect in Php cgi mode,
he doesn't see any error messages. All mysql_pconnects work like
mysql_connect.

My questions :
1 - How can users exactly determine whether they are using Php as a module
or cgi mode? (from phpinfo or ..?)
2 - Is it sufficient Php and Apache compiled in static or dynamic module
version in order to use mysql_pconnects in Php code? Anything to do with
MySQL?
3 - In a Apache + Php module compiled system is it normal to reach more than
predefined connection number in php.ini? (100 active connection but 25
defined in php.ini. In phpinfo shows same settings in the php.ini file (it
shows 25 max persistent connection))
4 - Is there any web page containing a real how-to and tutorial about
persistent connection? (If not I will certainly prepare one in a few weeks
:-))

Any kind of help will be appreciated...


Kayra Otaner
www.kelalaka.net





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




Hi!

  php manual...

        http://www.php.net/manual/features.persistent-connections.php

regards
Marcelo Gulin

Kayra Otaner escribió:
> 
> Hi,
> 
> I am searching for detailed information about persistent connection. I've
> looked at all the web sites just for "persistent" word but always I found
> the same information. All the time people are saying "persistent connection
> is good if you are dealing with lots of small queries".
> 
> Here is my case: This week I've upgraded necessary server software to the
> latest versions of Php and Apache (Php 4.04 and Apache 1.3.14) As I did
> before upgrade I've compiled Php as an Apache Static Module ( mod_so is not
> necessary ) And check MySQL for persistent connection. My site is focused on
> free web services like graphic counter, polls, url redirection, webring and
> news syndication to personal web sites. (www.kelalaka.net, it is Turkish
> only). Only for graphic counter services, it counts 180.000+ hits per day.
> It means 350.000+ queries per day. Day average is 250 query , 60 connection
> per minute, but in popular hours it is very high and MySQL server gives "Too
> many connections" errors. MySQL server is default and set to 100 connection
> at most.
> 
> Yesterday I ordered more ram in order to increase connection number of MySQL
> from 100 to 200+ connection. But today I realized that my server wasn't work
> with persistent connection.
> All the Php code contains mysql_pconnect for MySQL connections. Apache and
> Php works in module type not in cgi mode. I've looked at phpinfo() in order
> to see anything that can indicate status of persistent connection.  It says
> "mysql.allow_persistent is On". But again in phpinfo it says "Active
> Persistent Links 1" . It is sometime changes to "0". In MySQL I am looking
> for active processess by using "mysql" and "show processlist" commands it
> shows me 100 active links but most of them are in sleep state. In php.ini
> there is a line in order to set maximum number of persistent connection and
> I set it to just 25.
> If somebody uses mysql_pconnect's instead of mysql_connect in Php cgi mode,
> he doesn't see any error messages. All mysql_pconnects work like
> mysql_connect.
> 
> My questions :
> 1 - How can users exactly determine whether they are using Php as a module
> or cgi mode? (from phpinfo or ..?)
> 2 - Is it sufficient Php and Apache compiled in static or dynamic module
> version in order to use mysql_pconnects in Php code? Anything to do with
> MySQL?
> 3 - In a Apache + Php module compiled system is it normal to reach more than
> predefined connection number in php.ini? (100 active connection but 25
> defined in php.ini. In phpinfo shows same settings in the php.ini file (it
> shows 25 max persistent connection))
> 4 - Is there any web page containing a real how-to and tutorial about
> persistent connection? (If not I will certainly prepare one in a few weeks
> :-))
> 
> Any kind of help will be appreciated...
> 
> Kayra Otaner
> www.kelalaka.net
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




I have tow files named as "a+b.doc" and "x y.doc". Before I pass them to another page, 
I do urlencode first. But after I do urldecode in the next page, I got "a b.doc" 
instead of "a+b.doc", but the second file is correct. Could anybody help me to solve 
the problem ?

Thanks,

Zhihong Pan
Chek, Inc






rawurlencode() / rawurldecode()
^^^              ^^^

At 16:35 10.1. 2001, Zhihong Pan wrote the following:
-------------------------------------------------------------- 
>I have tow files named as "a+b.doc" and "x y.doc". Before I pass them to another 
>page, I do urlencode first. But after I do urldecode in the next page, I got "a 
>b.doc" instead of "a+b.doc", but the second file is correct. Could anybody help me to 
>solve the problem ?
>
>Thanks,
>
>Zhihong Pan
>Chek, Inc
>
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






Well the next problem I have found is that php has to be running on a
windows machine for the com objects to actually work and well we are running
it on a Unix box.  So we can't use the com objects.  Thanks for all the help
thought! 
Jay

-----Original Message-----
From: bard [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 09, 2001 5:37 PM
To: Miles Thompson
Cc: Paulson, Joseph V. "Jay"; [EMAIL PROTECTED]
Subject: Re: [PHP] Calling a Windows Com object or an Extended Fetch?


Or you could just look at the phpbuilder.com column on using COM objects in
php, or you could RTFM at the php.net site. just type in php.net/com and see
what happens. 

We use php and com here a lot, and while the implementation lacks a few
features of the asp/vb implementation it's handy when migrating from NT/ASP
to NT/PHP.


On Tue, 9 Jan 2001, Miles Thompson wrote:

> I don't know, but I was glancing through an article on PHP in the current 
> issue of Dr. Dobb's Journal last week. At the very end I *think* there was

> an example of calling a COM object. It was a VbScript <-> PHP comparision.

> Have a look, might help.
> 
> Miles
> 
> (Yes, I've been known to make notes while in the newsstand.)
> 
> At 10:01 AM 01/09/2001 -0600, Paulson, Joseph V. \"Jay\" wrote:
> >Hello everyone--
> >I was wondering if PHP can call Windows COM objects in memory?  If PHP
can
> >do this does anyone know how to do it or can you point me in the
direction
> >were I can pissibly figure it out.  Also, does anyone know if PHP can
call
> >an Extended Fetch?
> >Thanks,
> >Jay Paulson
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 





Looks like we still have the famous MSFT definition of cross-platform:
Windows, Windows 9x, Windows NT (and now Windows 2000).

So, is this the clinching argument for CORBA, rather than COM?
And I doubt the vaunted COM+ solves the problem.

Miles

At 09:42 AM 01/10/2001 -0600, Paulson, Joseph V. \"Jay\" wrote:
>Well the next problem I have found is that php has to be running on a
>windows machine for the com objects to actually work and well we are running
>it on a Unix box.  So we can't use the com objects.  Thanks for all the help
>thought!
>Jay
>
>-----Original Message-----
>From: bard [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, January 09, 2001 5:37 PM
>To: Miles Thompson
>Cc: Paulson, Joseph V. "Jay"; [EMAIL PROTECTED]
>Subject: Re: [PHP] Calling a Windows Com object or an Extended Fetch?
>
>
>Or you could just look at the phpbuilder.com column on using COM objects in
>php, or you could RTFM at the php.net site. just type in php.net/com and see
>what happens.
>
>We use php and com here a lot, and while the implementation lacks a few
>features of the asp/vb implementation it's handy when migrating from NT/ASP
>to NT/PHP.
>
>
>On Tue, 9 Jan 2001, Miles Thompson wrote:
>
> > I don't know, but I was glancing through an article on PHP in the current
> > issue of Dr. Dobb's Journal last week. At the very end I *think* there was
>
> > an example of calling a COM object. It was a VbScript <-> PHP comparision.
>
> > Have a look, might help.
> >
> > Miles
> >
> > (Yes, I've been known to make notes while in the newsstand.)
> >
> > At 10:01 AM 01/09/2001 -0600, Paulson, Joseph V. \"Jay\" wrote:
> > >Hello everyone--
> > >I was wondering if PHP can call Windows COM objects in memory?  If PHP
>can
> > >do this does anyone know how to do it or can you point me in the
>direction
> > >were I can pissibly figure it out.  Also, does anyone know if PHP can
>call
> > >an Extended Fetch?
> > >Thanks,
> > >Jay Paulson
> > >
> > >--
> > >PHP General Mailing List (http://www.php.net/)
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >







Try this article
http://www.phpbuilder.com/columns/alain20001003.php3

it helped me allot, If you go deeper into the Com object you will find that
you can actually call an object from a
remote server -- have not tried it myself yet : )
Niel Zeeman

----- Original Message -----
From: Paulson, Joseph V. "Jay" <[EMAIL PROTECTED]>
To: 'bard' <[EMAIL PROTECTED]>; Miles Thompson
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 5:42 PM
Subject: RE: [PHP] Calling a Windows Com object or an Extended Fetch?


> Well the next problem I have found is that php has to be running on a
> windows machine for the com objects to actually work and well we are
running
> it on a Unix box.  So we can't use the com objects.  Thanks for all the
help
> thought!
> Jay
>
> -----Original Message-----
> From: bard [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 09, 2001 5:37 PM
> To: Miles Thompson
> Cc: Paulson, Joseph V. "Jay"; [EMAIL PROTECTED]
> Subject: Re: [PHP] Calling a Windows Com object or an Extended Fetch?
>
>
> Or you could just look at the phpbuilder.com column on using COM objects
in
> php, or you could RTFM at the php.net site. just type in php.net/com and
see
> what happens.
>
> We use php and com here a lot, and while the implementation lacks a few
> features of the asp/vb implementation it's handy when migrating from
NT/ASP
> to NT/PHP.
>
>
> On Tue, 9 Jan 2001, Miles Thompson wrote:
>
> > I don't know, but I was glancing through an article on PHP in the
current
> > issue of Dr. Dobb's Journal last week. At the very end I *think* there
was
>
> > an example of calling a COM object. It was a VbScript <-> PHP
comparision.
>
> > Have a look, might help.
> >
> > Miles
> >
> > (Yes, I've been known to make notes while in the newsstand.)
> >
> > At 10:01 AM 01/09/2001 -0600, Paulson, Joseph V. \"Jay\" wrote:
> > >Hello everyone--
> > >I was wondering if PHP can call Windows COM objects in memory?  If PHP
> can
> > >do this does anyone know how to do it or can you point me in the
> direction
> > >were I can pissibly figure it out.  Also, does anyone know if PHP can
> call
> > >an Extended Fetch?
> > >Thanks,
> > >Jay Paulson
> > >
> > >--
> > >PHP General Mailing List (http://www.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]
>
>






Does this mean that of all of the people on this list, NOBODY
understands how php searches for include files? Surely somebody
knows!

How I think it SHOULD work is like DOS - First it looks at where
you say it is. If not there, it looks in the current directory.
If not there, it looks in the directories in the path. I'm sure
PHP doesn't work this way, but I can't figure out how it does
work.

Please, if anybody understands this, let me know.

Thanks!

Best regards,
 Randy   


Tuesday, January 09, 2001, 9:33:34 AM, you wrote:

R> I've done that too, but it's a real pain.

R> Does anyone know how php searches for include files?

R> Does everyone use the entire path?

R> Best regards,
R>  Randy   


R> Monday, January 08, 2001, 1:02:52 PM, you wrote:

W>> I use the full path to help fix this problem. This way no matter where you
W>> drop it in, it will work...

W>> <?php include ('/home/sites/home/web/cgi-bin/ads/ad.php');?>

W>> -----Original Message-----
W>> From: Randy [mailto:[EMAIL PROTECTED]]
W>> Sent: Monday, January 08, 2001 2:02 PM
W>> To: [EMAIL PROTECTED]
W>> Subject: [PHP] include path confusion


W>> I'm confused on what should be a simple issue - where does php
W>> look for an include file in the following example? My test
W>> results seem very confusing and the docs never mention it.

W>> In the program:
W>>   include "../test/sample.php";

W>> In php.ini:
W>>   include_path="../include"

W>> Does php:
W>>   A. Look in the dir "../test" for sample.php first and if not found,
W>>   look in "../include" for sample.php?
W>>   B. Ignore the dir "../test/" and look in "../include" for
W>>   sample.php?
W>>   C. Look in dir "../test" for sample.php and if not found, look
W>>   in "../include" for "../test/sample.php"? (and can't find it as
W>>   invalid)
W>>   D. Look only in dir "../include" for "../test/sample.php"? (and
W>>   can't find it as invalid)

W>> Does it work exactly the same for REQUIRE?

W>> TIA
W>> --
W>> Best regards,
W>>  Randy



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







Hello Randy, 

(R == "Randy") [EMAIL PROTECTED] writes:

R> How I think it SHOULD work is like DOS - First it looks at where
R> you say it is. If not there, it looks in the current directory.

Let's not forget Unix. ;-)

R> If not there, it looks in the directories in the path. I'm sure PHP
R> doesn't work this way, but I can't figure out how it does work.

% egrep include /usr/local/lib/php3.ini
include_path = ; UNIX: "/path1:/path2"  Windows: "\path1;\path2"

It checks each path in order. It will stop when it finds the file in
the first available location.

R> Please, if anybody understands this, let me know.

-Brian
--
An adequate bootstrap is a contradiction in terms.






How do I use a function?

I did:

function ShowMessage {
  echo "Show message...\n";
}

How can I call the function now?

thanks,

Augusto Cesar Castoldi





Hi

not the () after the function name!!!!

> 
> function ShowMessage() {
>   echo "Show message...\n";
> }
> 
> How can I call the function now?
> 


echo ShowMessage();


:: Emil

---
Emil Rasmussen
http://www.noget.net





That should bee notice and not "not"! Ups :-)

> 
> Hi
> 
> not the () after the function name!!!!
> 
> > 
> > function ShowMessage() {
> >   echo "Show message...\n";
> > }
> > 
> > How can I call the function now?
> > 
> 
> 
> echo ShowMessage();
> 
> 
> :: Emil
> 
> ---
> Emil Rasmussen
> http://www.noget.net
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




<?
 function showfunction()
 {
  echo "Show Function<br>\n";
 }

 function returnfunction()
 {
  return "showfunction<br>\n";
 }

 showfunction();

 echo returnfunction();
?>

Chris Lee
Mediawaveonline.com
"Augusto Cesar Castoldi" <[EMAIL PROTECTED]> wrote in message
Pine.GSO.4.10.10101101404540.1072-100000@juno">news:Pine.GSO.4.10.10101101404540.1072-100000@juno...
> How do I use a function?
>
> I did:
>
> function ShowMessage {
>   echo "Show message...\n";
> }
>
> How can I call the function now?
>
> thanks,
>
> Augusto Cesar Castoldi
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Hi!

  ShowMessage();

regards
Marcelo Gulin

Augusto Cesar Castoldi escribió:
> 
> How do I use a function?
> 
> I did:
> 
> function ShowMessage {
>   echo "Show message...\n";
> }
> 
> How can I call the function now?
> 
> thanks,
> 
> Augusto Cesar Castoldi
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Hello,

I am making a shopping cart.  I am wondering on how I should separate each
user.  I though the I.P. would be good but there can be a couple people on
one I.P. so if someone is sharing an I.P. it will mess things up.. Anyone
got a better way to do it?

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------





I use MyCart for the sites I've built around Shopping Carts.  In MyCart
there is some combination of ip address and date or time (I haven't looked
at the source recently) concatenated together.

You might want to take a look at MyCart for ideas...or as a solution to
avoid having to build a cart from scratch.

John Guynn

This email brought to you by RFCs 821 and 1225.


-----Original Message-----
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 10, 2000 10:18 AM
To: PHP User Group
Subject: [PHP] Shopping Carts


Hello,

I am making a shopping cart.  I am wondering on how I should separate each
user.  I though the I.P. would be good but there can be a couple people on
one I.P. so if someone is sharing an I.P. it will mess things up.. Anyone
got a better way to do it?




I use sessions combinded with utc

 function mtime()
 {
   $mtime = microtime();
   $mtime = ereg_replace('\.', '', $mtime);
   $mtime = explode(' ', $mtime);
   $mtime = $mtime[1] . $mtime[0];
  return($mtime);
 }

will ALLWAYS return a unique number, store this number in a session, each
user gets assigned a sessionID now each user has their own number, 100%
unique to themselves. this is how I seperate my users. Ive built quite a few
cart systems with this aproch. I store the cart right in the sessions, but I
have also set systems up where the cart is right in the db. I did the later
because a client wanted to have a way to see the % of users that put things
in their cart and never purchased, and % of products purchased to %
abandonded in their cart.

Your right on the IP system, here in the office I share the same IP with 12
people throught a NAT.

I dont know if you need to use an IP at all, if this is just for a cart...
then big deal, some script kiddy could try 36^32 possible combinations of a
PHPSESSID to try and hijack their cart ! haha. maybe for a something a
little more secure.

Chris Lee
Mediawaveonline.com



"Brandon Orther" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I am making a shopping cart.  I am wondering on how I should separate each
> user.  I though the I.P. would be good but there can be a couple people on
> one I.P. so if someone is sharing an I.P. it will mess things up.. Anyone
> got a better way to do it?
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.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]
>






----- Original Message -----
From: "Neil Zanella" <[EMAIL PROTECTED]>
To: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 09, 2001 11:55 PM
Subject: [PHP] PHP newbie question


:
: Hello,
:
: I have a question regarding the following 3 one line .php files:
:
: <?php if (! isset($a)) print "Hello, World!"; // script 1 ?>

isset($a) returns false, the ! reverses it to true, and it prints "Hello,
World!"

:
: <?php if (! $a) print "Hello, World!"; // script 2 ?>

$a evaluates to false, the ! reverses it, and it prints "Hello, World!"

: <?php if (! ) print "Hello, World!"; // script 3 ?>

You get a syntax error. PHP's ! operator does _not_ evaluate to any value;
it has to have a value to operate on. Hence, if you just say if (! ), you
get a syntax error... there's nothing for the ! to operate on.

:
: The first script prints the famous words correctly but what baffles
: me is the second script which should be the same as the third script
: since $a is not set and hence should evaluate to nothing, but PHP 3.0.15
: is evaluating ! $a to true instead of giving me a syntax error as in
: script 3. Can someone explain why this is? Does this make the isset()
: built in function redundant in general?

No, this doesn't make isset() redundant. isset($var) will return true if
$var=0, whereas just testing $var would evaluate to false (since it is 0).

TB

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






On Wed, 10 Jan 2001, Toby Butzon wrote:

> : <?php if (! $a) print "Hello, World!"; // script 2 ?>
> 
> $a evaluates to false, the ! reverses it, and it prints "Hello, World!"

What is bothering me is the following: if variables that are not assigned
a value were to evaluate to false then since false is the same as the
number 1 the following PHP script should print the number 1 but instead
prints nothing:

<?php if (! $a) print $a; ?>

How is this behavior justified?
I could not find anything on this in the PHP manual.

Thanks,

-- Neil





since when is false equal to one? in PHP, false is represented 
by string(0) "", and true by 1. so, you really want 
<?php if (! $a) print !$a; ?>

At 19:33 10.1. 2001, Neil Zanella wrote the following:
-------------------------------------------------------------- 

>On Wed, 10 Jan 2001, Toby Butzon wrote:
>
>> : <?php if (! $a) print "Hello, World!"; // script 2 ?>
>> 
>> $a evaluates to false, the ! reverses it, and it prints "Hello, World!"
>
>What is bothering me is the following: if variables that are not assigned
>a value were to evaluate to false then since false is the same as the
>number 1 the following PHP script should print the number 1 but instead
>prints nothing:
>
><?php if (! $a) print $a; ?>
>
>How is this behavior justified?
>I could not find anything on this in the PHP manual.
>
>Thanks,
>
>-- Neil
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






If you don't assign a value for $a why would PHP assign it one? The
statement if(!$a) should not assign a value to $a. Thus when print $a is
executed, $a still has no value. BTW: 0 is false.

Dave M.
Online Services, USA

----- Original Message -----
From: "Neil Zanella" <[EMAIL PROTECTED]>
To: "Toby Butzon" <[EMAIL PROTECTED]>
Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 10:33 AM
Subject: Re: [PHP] PHP newbie question


>
> On Wed, 10 Jan 2001, Toby Butzon wrote:
>
> > : <?php if (! $a) print "Hello, World!"; // script 2 ?>
> >
> > $a evaluates to false, the ! reverses it, and it prints "Hello, World!"
>
> What is bothering me is the following: if variables that are not assigned
> a value were to evaluate to false then since false is the same as the
> number 1 the following PHP script should print the number 1 but instead
> prints nothing:
>
> <?php if (! $a) print $a; ?>
>
> How is this behavior justified?
> I could not find anything on this in the PHP manual.
>
> Thanks,
>
> -- Neil
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Hello Neil,

Wednesday, January 10, 2001, 10:33:09 AM, you wrote:


>> : <?php if (! $a) print "Hello, World!"; // script 2 ?>
>> 
>> $a evaluates to false, the ! reverses it, and it prints "Hello, World!"

NZ> What is bothering me is the following: if variables that are not assigned
NZ> a value were to evaluate to false then since false is the same as the
NZ> number 1 the following PHP script should print the number 1 but instead
NZ> prints nothing:

NZ> <?php if (! $a) print $a; ?>

NZ> How is this behavior justified?

The operation (! $a) must return something .. true or false.  The only
other option would be to crash the system to a debugger with a nasty
message about the developer should have checked the variable cause it
wasn't assigned.

For this reason if you are unsure about the state try

If (isset($a) {
  If (! $a) {
  }
  Else {
  }
}

Something like this always works.


-- 
DSig                                 `````
David Tod Sigafoos                  ( O O )
mailto:[EMAIL PROTECTED] _______oOOo__( )__oOOo_______

Using 'The Bat' 1.48f






This is my weekly flamebait on the subject of unset variables and checking 
against those. 

isset() fails on form elements (ie a text box that is left empty) therefore the
variable will be set, but it will be set to '' - to check thoroughly you would
have to do if(isset($var) && !empty($var)) or, my personal favorite, is the
if(strlen($var)) 

empty() acts really wierd when values are set to 0 and isset() doesn't always
catch everything you need done.

--Joe

On Wed, Jan 10, 2001 at 11:12:56AM -0800, David Tod Sigafoos wrote:
> Hello Neil,
> 
> Wednesday, January 10, 2001, 10:33:09 AM, you wrote:
> 
> 
> >> : <?php if (! $a) print "Hello, World!"; // script 2 ?>
> >> 
> >> $a evaluates to false, the ! reverses it, and it prints "Hello, World!"
> 
> NZ> What is bothering me is the following: if variables that are not assigned
> NZ> a value were to evaluate to false then since false is the same as the
> NZ> number 1 the following PHP script should print the number 1 but instead
> NZ> prints nothing:
> 
> NZ> <?php if (! $a) print $a; ?>
> 
> NZ> How is this behavior justified?
> 
> The operation (! $a) must return something .. true or false.  The only
> other option would be to crash the system to a debugger with a nasty
> message about the developer should have checked the variable cause it
> wasn't assigned.
> 
> For this reason if you are unsure about the state try
> 
> If (isset($a) {
>   If (! $a) {
>   }
>   Else {
>   }
> }
> 
> Something like this always works.
> 
> 
> -- 
> DSig                                 `````
> David Tod Sigafoos                  ( O O )
> mailto:[EMAIL PROTECTED] _______oOOo__( )__oOOo_______
> 
> Using 'The Bat' 1.48f
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com






Thanks and sorry about the confusion... true == 1 and false == 0.
To summarize this discussion:

1) Unset variables evaluate to the empty string:

   <?php unset($a); if ($a == "") print "something\n"; ?>

   outputs the string "something"

   <?php unset($a); $b = ""; if ($a == $b) print "something\n"; ?>

   outputs the string "something"

   Note that $a == $b evaluates to true even though
   $a is not set but $b is set.

2) In the condition of a conditional expression the only string that
   evaluates to false is the empty string "". All other strings
   evaluate to true. For example:

   <?php if ("hello") print "something\n"; ?>

   produces output but

   <?php if ("") print "something else\n"; ?> 

   produces no output.

Please let me know if for some reason this is still not correct.

Thanks!

Neil






----- Original Message ----- 
From: "Neil Zanella" <[EMAIL PROTECTED]>
To: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 11:58 AM
Subject: Re: [PHP] PHP newbie question

>....
> 
>    <?php if ("") print "something else\n"; ?> 
> 

"" is false.

>    produces no output.
> 
> Please let me know if for some reason this is still not correct.
> 
> Thanks!
> 
> Neil
> 
> 







On Wed, 10 Jan 2001, Hsieh, Wen-Yang wrote:

> "" is false.

The following three seem to be the same in PHP3:

1) false
2) ""
3) 0

I guess that "" is automatically cast to 0 or to false
wherever an integer is required. Where can I find the
exact casting rules in PHP3/4 ?

Thanks,

Neil






----- Original Message -----
From: "Neil Zanella" <[EMAIL PROTECTED]>
To: "Hsieh, Wen-Yang" <[EMAIL PROTECTED]>
Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 1:11 PM
Subject: Re: [PHP] PHP newbie question


>
> On Wed, 10 Jan 2001, Hsieh, Wen-Yang wrote:
>
> > "" is false.
>
> The following three seem to be the same in PHP3:
>
> 1) false
> 2) ""
> 3) 0

zero and an empty string were understood to be false.  Still they are
different.

>
> I guess that "" is automatically cast to 0 or to false
> wherever an integer is required. Where can I find the
> exact casting rules in PHP3/4 ?

http://www.php.net/manual/language.types.type-juggling.php#language.types.ty
pecasting

>
> Thanks,
>
> Neil
>





hi,

I 've got problems executing .exe through Php script.


On my machine ( NT4, Omnihttpd), i can do whatever I want, but when I
transfer my scripts to
my server NT4 with IIS4, something goes wrong, (with a "dir" nothing
happens, with a "help" it slows down my server to a point I need to reboot
it)

To summarize I need to execute an exe for a connection with a bank and as it
did not work I tried with some DOS commands.

(I gave the proper rights to the directory containing my exe and my scripts)


Below is my script
<?
$CmdLine ="help";

$LastLine = exec($CmdLine, $AllOutput, $ReturnValue);
 print("Last Line : $LastLine <br>\n");
 print("Output : <br>\n");
 print $allOutput;
 for ($index = 0; $index < count($AllOutput); $index++)
 {
 print("$AllOutput[$index] <br>\n");
 }
 print ("<br><br>\n");
 print("return value : $ReturnValue<br>\n");
 
 ?>


Thanks in advance if someone had a similar problem

Luc




Hi Max!

--- you wrote: 
> Hello sam1600,
> 
> Wednesday, January 10, 2001, 6:42:58 AM, you wrote:
> 
> sic> What in the world is reason for declaring the following in the class?:
> sic> var $somevar;
> sic> I see no reason, and no differences if I don't declare: var $somevar;
> 
> Classes are intended to be structured data storage. You should define
> a structure of the class before using the class.
> You can set the value of the $somevar anytime later, when using an
> object of class a.
> $d->somevar = true;
> and the next call to $d->b() will print nothing.
> But you won't be able to assign a value to $somevar, if it is not
> declared in the class.

This does not appear to be true.  With error reporting set to max, and the 
variables not defined in the class ( $somevar,$somevar2 and $somevar3 ),
the following will echo out:
Not set
empty
value of somevar2
value of somevar3

class a {
   function b(){
     if (!isset($this->somevar))
          echo "Not set<br>";
     if (empty($this->somevar))
         echo "empty<br>";
      }
   }
$d = new a;
$d->b();
$d->somevar2 = "value of somevar2<br>";
$d->somevar3 = "value of somevar3<br>";
echo $d->somevar2;
echo $d->somevar3;


> 
> sic> Maybe a better question is what will break if I do not declare
> sic> my vars in my class definition?
> 
> the method b() of the class a will break if you don't declare $somevar
> in the class definition. In the string "if (!isset($this->somevar))"
> it would throw an error saying that you have no variable named 'somevar' in
> you class.

 This does not appear to be true either, see above.

Thanks,
Sam

I'm using php4.0


----------------------------------------------------------------
Get your free email from AltaVista at http://altavista.iname.com




Hello sam1600,

Wednesday, January 10, 2001, 7:44:44 PM, you wrote:

>> $d->somevar = true;
>> and the next call to $d->b() will print nothing.
>> But you won't be able to assign a value to $somevar, if it is not
>> declared in the class.

sic> This does not appear to be true.  With error reporting set to max, and the 
sic> variables not defined in the class ( $somevar,$somevar2 and $somevar3 ),
sic> the following will echo out:
sic> Not set
sic> empty
sic> value of somevar2
sic> value of somevar3

sic> class a {
sic>    function b(){
sic>      if (!isset($this->somevar))
sic>           echo "Not set<br>";
sic>      if (empty($this->somevar))
sic>          echo "empty<br>";
sic>       }
sic>    }
sic> $d = new a;
$d->b();
$d->somevar2 = "value of somevar2<br>";
$d->somevar3 = "value of somevar3<br>";
echo $d->somevar2;
echo $d->somevar3;

try to assign something to $d->somevar if it is not declared in the
definition.


>> the method b() of the class a will break if you don't declare $somevar
>> in the class definition. In the string "if (!isset($this->somevar))"
>> it would throw an error saying that you have no variable named 'somevar' in
>> you class.

sic>  This does not appear to be true either, see above.

bad practice anyway

-- 
Best regards,
Max A. Derkachev mailto:[EMAIL PROTECTED]
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia
 







Max,

Thanks for your response.

Assigning something to $d->somevar when it is not declared in the
definition works fine.

As far as I can tell, and from what we have found here, there is 
absolutly no reason whatsoever to define variables in class definitions.

If someone can show me me a reason , other than a pure aesthetics,
why this is nessesary I would sure like to know.  If anyone could
show me at least one example where not defining variables in class
definitions would somehow break the class, I would like to see it. 


Thanks,
Sam


>> $d->somevar = true;
>> and the next call to $d->b() will print nothing.
>> But you won't be able to assign a value to $somevar, if it is not
>> declared in the class.

sic> This does not appear to be true.  With error reporting set to max, and the 
sic> variables not defined in the class ( $somevar,$somevar2 and $somevar3 ),
sic> the following will echo out:
sic> Not set
sic> empty
sic> value of somevar2
sic> value of somevar3

sic> class a {
sic>    function b(){
sic>      if (!isset($this->somevar))
sic>           echo "Not set<br>";
sic>      if (empty($this->somevar))
sic>          echo "empty<br>";
sic>       }
sic>    }
sic> $d = new a;
$d->b();
$d->somevar2 = "value of somevar2<br>";
$d->somevar3 = "value of somevar3<br>";
echo $d->somevar2;
echo $d->somevar3;

try to assign something to $d->somevar if it is not declared in the
definition.


>> the method b() of the class a will break if you don't declare $somevar
>> in the class definition. In the string "if (!isset($this->somevar))"
>> it would throw an error saying that you have no variable named 'somevar' in
>> you class.

sic>  This does not appear to be true either, see above.

bad practice anyway

----------------------------------------------------------------
Get your free email from AltaVista at http://altavista.iname.com




They don't break the classes per se, but it definately promotes good OOP 
structure. Keep this in mind for PHP 5 and PHP 6 which might (who knows) bring
us more strict OOP rules (ie private and public variables). In which case your
classes would have to be entirely rewritten instead of just putting a public:
or private: in front of your already defined variables.

--Joe

On Wed, Jan 10, 2001 at 01:55:34PM -0500, [EMAIL PROTECTED] wrote:
> 
> Max,
> 
> Thanks for your response.
> 
> Assigning something to $d->somevar when it is not declared in the
> definition works fine.
> 
> As far as I can tell, and from what we have found here, there is 
> absolutly no reason whatsoever to define variables in class definitions.
> 
> If someone can show me me a reason , other than a pure aesthetics,
> why this is nessesary I would sure like to know.  If anyone could
> show me at least one example where not defining variables in class
> definitions would somehow break the class, I would like to see it. 
> 
> 
> Thanks,
> Sam
> 
> 
> >> $d->somevar = true;
> >> and the next call to $d->b() will print nothing.
> >> But you won't be able to assign a value to $somevar, if it is not
> >> declared in the class.
> 
> sic> This does not appear to be true.  With error reporting set to max, and the 
> sic> variables not defined in the class ( $somevar,$somevar2 and $somevar3 ),
> sic> the following will echo out:
> sic> Not set
> sic> empty
> sic> value of somevar2
> sic> value of somevar3
> 
> sic> class a {
> sic>    function b(){
> sic>      if (!isset($this->somevar))
> sic>           echo "Not set<br>";
> sic>      if (empty($this->somevar))
> sic>          echo "empty<br>";
> sic>       }
> sic>    }
> sic> $d = new a;
> $d->b();
> $d->somevar2 = "value of somevar2<br>";
> $d->somevar3 = "value of somevar3<br>";
> echo $d->somevar2;
> echo $d->somevar3;
> 
> try to assign something to $d->somevar if it is not declared in the
> definition.
> 
> 
> >> the method b() of the class a will break if you don't declare $somevar
> >> in the class definition. In the string "if (!isset($this->somevar))"
> >> it would throw an error saying that you have no variable named 'somevar' in
> >> you class.
> 
> sic>  This does not appear to be true either, see above.
> 
> bad practice anyway
> 
> ----------------------------------------------------------------
> Get your free email from AltaVista at http://altavista.iname.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]

---
Joe Stump
PHP Programmer
www.Care2.com





This isn't really aesthetics as much as it is organization.

You already know that you don't have to declare PHP
variables... if I had a one-line script that simply said:
<?php echo $myVar++ ?>
I would end up with 1 as the output. myVar would be created
as soon as PHP encountered it (it would be empty, however),
and with the ++ the variable would be type-casted to a
numeric type (yeilding 0) and 1 would be added. Thus you get
1 as your output.

Likewise, if you reference a non-existant variable that is
within a class, PHP initializes the variable with an empty
value. You're going to end up with a variable, not an error,
whether it's explicitly defined in the class or not.

However, here's why it's not just aesthetics:

If you have a lot of code to go through, organization is
important. If you declare a class and only define some
functions (without explicitly defining variables with var
$myVar, etc.), you could very well end up wondering what
variable is what and whether a variable exists, etc. It
wouldn't be too hard to stray from the right path and end up
with half of your variables misnamed.

-Toby

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 1:55 PM
Subject: Re: Re[2]: [PHP] declaring variables in class
definitions


>
> Max,
>
> Thanks for your response.
>
> Assigning something to $d->somevar when it is not declared
in the
> definition works fine.
>
> As far as I can tell, and from what we have found here,
there is
> absolutly no reason whatsoever to define variables in
class definitions.
>
> If someone can show me me a reason , other than a pure
aesthetics,
> why this is nessesary I would sure like to know.  If
anyone could
> show me at least one example where not defining variables
in class
> definitions would somehow break the class, I would like to
see it.
>
>
> Thanks,
> Sam
>
>
> >> $d->somevar = true;
> >> and the next call to $d->b() will print nothing.
> >> But you won't be able to assign a value to $somevar, if
it is not
> >> declared in the class.
>
> sic> This does not appear to be true.  With error
reporting set to max, and the
> sic> variables not defined in the class
 $somevar,$somevar2 and $somevar3 ),
> sic> the following will echo out:
> sic> Not set
> sic> empty
> sic> value of somevar2
> sic> value of somevar3
>
> sic> class a {
> sic>    function b(){
> sic>      if (!isset($this->somevar))
> sic>           echo "Not set<br>";
> sic>      if (empty($this->somevar))
> sic>          echo "empty<br>";
> sic>       }
> sic>    }
> sic> $d = new a;
> $d->b();
> $d->somevar2 = "value of somevar2<br>";
> $d->somevar3 = "value of somevar3<br>";
> echo $d->somevar2;
> echo $d->somevar3;
>
> try to assign something to $d->somevar if it is not
declared in the
> definition.
>
>
> >> the method b() of the class a will break if you don't
declare $somevar
> >> in the class definition. In the string "if
(!isset($this->somevar))"
> >> it would throw an error saying that you have no
variable named 'somevar' in
> >> you class.
>
> sic>  This does not appear to be true either, see above.
>
> bad practice anyway
>
> ----------------------------------------------------------
------
> Get your free email from AltaVista at
http://altavista.iname.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]
>
>





Hi Toby,


>This isn't really aesthetics as much as it is organization.

>You already know that you don't have to declare PHP
>variables... if I had a one-line script that simply said:
><?php echo $myVar++ ?>
>I would end up with 1 as the output. myVar would be created
>as soon as PHP encountered it (it would be empty, however),
>and with the ++ the variable would be type-casted to a
>numeric type (yeilding 0) and 1 would be added. Thus you get
>1 as your output.

>Likewise, if you reference a non-existant variable that is
>within a class, PHP initializes the variable with an empty
>value. You're going to end up with a variable, not an error,
>whether it's explicitly defined in the class or not.

Defining variables with (var $myVar;) in a class does not
initialize that variable in any way.  It still does
not exist in any way whatsoever, period.  I repeat,
var $myVar; does NOT set the varable


If the variable was set I could see a reason for the
defining, but because the variable is not set and does not exist,
after (var $myVar;), there is no reaon for this other that commenting
your code as you said.

But on the otherhand if php is just showing us a way to define default
values for variables outside of class methods like (var $myVar = "somevalue";)
which ofcource works , thats just fine, but just sticking (var $myVar;)
in there is just useless.


>However, here's why it's not just aesthetics:

>If you have a lot of code to go through, organization is
>important. If you declare a class and only define some
>functions (without explicitly defining variables with var
>$myVar, etc.), you could very well end up wondering what
>variable is what and whether a variable exists, etc. It
>wouldn't be too hard to stray from the right path and end up
>with half of your variables misnamed.

In each method of the class you still have to reference the object 
variables with a $this->myVar, whether the $myVar is deifined
in the class with (var $myVar;) or not ( unless you are wanting
to use a variable local to the method ofcource which is another matter ).
So declaring (var $myVar;) in the class will not stop you from missnameing
variables and also defining (var $myVar;) does not set the
variable, in fact the variable still does not exist in anyway whatsoever.

I hope you understand what I'm saying. Sure, defining variables in the class
is a nice way to organize your code.  But if (var $myVar;) does absolutly nothing
whats the point.  If I want to comment my code I can do:
// note to Sam: don't misspell $myvar ;-)

Thanks,
Sam


----------------------------------------------------------------
Get your free email from AltaVista at http://altavista.iname.com




You're right, AFAIK.

IMO, it might be more useful (and follow a more expected
format) if var $myVar _did_ initialize the variable and if
you try to use a variable that isn't explicitly defined in
the class throw an error...

But that's not the way it is...

-Toby

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 3:31 PM
Subject: Re: Re[2]: [PHP] declaring variables in class
definitions


> Hi Toby,
>
>
> >This isn't really aesthetics as much as it is
organization.
>
> >You already know that you don't have to declare PHP
> >variables... if I had a one-line script that simply said:
> ><?php echo $myVar++ ?>
> >I would end up with 1 as the output. myVar would be
created
> >as soon as PHP encountered it (it would be empty,
however),
> >and with the ++ the variable would be type-casted to a
> >numeric type (yeilding 0) and 1 would be added. Thus you
get
> >1 as your output.
>
> >Likewise, if you reference a non-existant variable that
is
> >within a class, PHP initializes the variable with an
empty
> >value. You're going to end up with a variable, not an
error,
> >whether it's explicitly defined in the class or not.
>
> Defining variables with (var $myVar;) in a class does not
> initialize that variable in any way.  It still does
> not exist in any way whatsoever, period.  I repeat,
> var $myVar; does NOT set the varable
>
>
> If the variable was set I could see a reason for the
> defining, but because the variable is not set and does not
exist,
> after (var $myVar;), there is no reaon for this other that
commenting
> your code as you said.
>
> But on the otherhand if php is just showing us a way to
define default
> values for variables outside of class methods like (var
$myVar = "somevalue";)
> which ofcource works , thats just fine, but just sticking
(var $myVar;)
> in there is just useless.
>
>
> >However, here's why it's not just aesthetics:
>
> >If you have a lot of code to go through, organization is
> >important. If you declare a class and only define some
> >functions (without explicitly defining variables with var
> >$myVar, etc.), you could very well end up wondering what
> >variable is what and whether a variable exists, etc. It
> >wouldn't be too hard to stray from the right path and end
up
> >with half of your variables misnamed.
>
> In each method of the class you still have to reference
the object
> variables with a $this->myVar, whether the $myVar is
deifined
> in the class with (var $myVar;) or not ( unless you are
wanting
> to use a variable local to the method ofcource which is
another matter ).
> So declaring (var $myVar;) in the class will not stop you
from missnameing
> variables and also defining (var $myVar;) does not set the
> variable, in fact the variable still does not exist in
anyway whatsoever.
>
> I hope you understand what I'm saying. Sure, defining
variables in the class
> is a nice way to organize your code.  But if (var $myVar;)
does absolutly nothing
> whats the point.  If I want to comment my code I can do:
> // note to Sam: don't misspell $myvar ;-)
>
> Thanks,
> Sam
>
>
> ----------------------------------------------------------
------
> Get your free email from AltaVista at
http://altavista.iname.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>
>





I think the subject pretty much says it all.  I need help setting up things
on both ends to let a VB app (on Windows, obviously) connect to a PostgreSQL
database on a Linux box.

Any help appreciated.

        - Theo

Sorry about cross-posting to the two lists, but I figured it was pertinent
to both.




Hello,
I am doing my own file manager over the web and for that application I
need to identify what mime-type has each file that user has on his own
space. I know I can code some parser of /etc/mime.types and use its data
to identify mime types by file extension, but first I would like to ask
if these functions are already included in some libraries or anywhere
else?

Tanks in advance

Nikolai




use exec() and unix's command 'file'

exec("file $filename");

and admire the output :)

http://www.php.net/manual/function.exec.php

Chris Lee
Mediawaveonline.com




"Nikolai Vladychevski" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
> I am doing my own file manager over the web and for that application I
> need to identify what mime-type has each file that user has on his own
> space. I know I can code some parser of /etc/mime.types and use its data
> to identify mime types by file extension, but first I would like to ask
> if these functions are already included in some libraries or anywhere
> else?
>
> Tanks in advance
>
> Nikolai
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Chris Lee wrote:
> 
> use exec() and unix's command 'file'
> 
> exec("file $filename");
> 
> and admire the output :)

I know, but "file" does not gives it based on /etc/mime.types, it even
has nothing to do with apache.....


Nikolai




besides, a file type can be defined in httpd.conf, not in 
mime.types

At 19:48 10.1. 2001, Nikolai Vladychevski wrote the following:
-------------------------------------------------------------- 
>Chris Lee wrote:
>> 
>> use exec() and unix's command 'file'
>> 
>> exec("file $filename");
>> 
>> and admire the output :)
>
>I know, but "file" does not gives it based on /etc/mime.types, it even
>has nothing to do with apache.....
>
>
>Nikolai
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






err, how about apache_lookup_uri()?
http://docs.wad.cz/php/function.apache-lookup-uri.html


At 20:01 10.1. 2001, Nikolai Vladychevski , Chris Lee <[EMAIL PROTECTED]> wrote 
the following:
-------------------------------------------------------------- 
>besides, a file type can be defined in httpd.conf, not in 
>mime.types
>
>At 19:48 10.1. 2001, Nikolai Vladychevski wrote the following:
>-------------------------------------------------------------- 
>>Chris Lee wrote:
>>> 
>>> use exec() and unix's command 'file'
>>> 
>>> exec("file $filename");
>>> 
>>> and admire the output :)
>>
>>I know, but "file" does not gives it based on /etc/mime.types, it even
>>has nothing to do with apache.....
>>
>>
>>Nikolai
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>------end of quote------ 
>
>
>____________________________________________________________
>Cynic:
>
>A member of a group of ancient Greek philosophers who taught
>that virtue constitutes happiness and that self control is
>the essential part of virtue.
>
>[EMAIL PROTECTED]
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






echo array_sum($price) * tax;

array_sum() was added to PHP 4.0.4.

Chris Lee wrote:
> 
> <?
>  function add_all($array)
>  {
>   foreach($array as $pos => $val)
>    @$sum += $val;
>   return @$sum;
>  }
> 
>  $price[123] = 5;
>  $price[123] = 2;
>  $price[123] = 7;
>  $price[123] = 9;
> 
>  $tax = 0.14;
> 
>  echo add_all($price) * $tax;
> ?>
> 
> is there a built in function to replace add_all, I would like to have a
> add_all, multiply_all, divide_all, etc etc. a php function would just be
> nicer...
> 
> Chris Lee
> Mediawaveonline.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]

--
Monte Ohrt <[EMAIL PROTECTED]>
http://www.ispi.net/




> Please help! Perhaps you have an idea what to do:
> 
> I want to get information directly from sendmail,
> like the body of the message and, very important,
> the receipients address.
> 
> So if someone sends an email to [EMAIL PROTECTED]
> I want to see who it was sent to.
> 
> Currently I am using a script that is triggered
> by an alias in /etc/aliases. Problem here is, I
> only get the header but no more information. This
> script isn't intended for one single user but for
> a whole domain, purpose is for messaging. So I
> really don't want to create a login for every possible
> name as I don't know the names before. You have
> to think of this like a short messaging service
> where you send a message to [EMAIL PROTECTED]
> with 0123456789 beeing the phone number of the
> subscriber.
> The above mentioned script gets the emails' contents
> from stdin but fails if e.g. the mail is sent as
> a blind copy (BCC) or if multiple receipients are
> listed in the header!
> 
> Do you have an idea for me? I was thinking about
> the mailertable, to do something similar as you
> do when you set up an UUCP account for a whole
> domain, but I don't know where I can interface.
> 
> So, any ideas are highly appreciated!
> 
> Thanks,
> 
> dk




See WDDX
Alain

"Brinkman, Theodore" wrote:
> 
> I think the subject pretty much says it all.  I need help setting up things
> on both ends to let a VB app (on Windows, obviously) connect to a PostgreSQL
> database on a Linux box.
> 
> Any help appreciated.
> 
>         - Theo
> 
> Sorry about cross-posting to the two lists, but I figured it was pertinent
> to both.
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




Anymody knows any way of making diagnostics of PHP code to make
optimizations???

In mod_perl exists a bunch of utilitys & modules to make this things like
Devel::DProf

I usually put PHP in the maximun Warning level and write them to a log file,
or using the debugger and see the output in other machine.

Also in PHP4 its imposible to use the debugger, so the things are harder...

-- 
     \|||||||/    Guillermo Pérez Pérez
     < o   o >      - [EMAIL PROTECTED]
      \  L  /       - [EMAIL PROTECTED]
 -oOOo-------oOOo-
 Onírica: Análisis, diseño e implantación de soluciones informáticas
          http://www.onirica.com




I'm sure this is an easy question (I'm just too dumb to figure it out).

When I run a php script from the shell it always outputs
X-Powered-By: PHP/4.0.3pl1
Content-type: text/html

Normally I just ignore this, but I've been using cron to run a php script
and I'm getting my mailbox cluttered with messages that just contain the
above 2 lines.  Is there a way to make the cgi version of php not send those
two lines.  I tried changing default_mimetype ="" in the php.ini file but
that didn't work.

Thanks






Add a -q

#!/usr/local/bin/php -q 

To suppress them.


Philip Olson
http://www.cornado.com/

On Wed, 10 Jan 2001, Tom Harris wrote:

> I'm sure this is an easy question (I'm just too dumb to figure it out).
> 
> When I run a php script from the shell it always outputs
> X-Powered-By: PHP/4.0.3pl1
> Content-type: text/html
> 
> Normally I just ignore this, but I've been using cron to run a php script
> and I'm getting my mailbox cluttered with messages that just contain the
> above 2 lines.  Is there a way to make the cgi version of php not send those
> two lines.  I tried changing default_mimetype ="" in the php.ini file but
> that didn't work.
> 
> Thanks
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 





I think you could also turn expose_php off in php.ini (if you 
use it)

At 19:11 10.1. 2001, Philip Olson wrote the following:
-------------------------------------------------------------- 
>Add a -q
>
>#!/usr/local/bin/php -q 
>
>To suppress them.
>
>
>Philip Olson
>http://www.cornado.com/
>
>On Wed, 10 Jan 2001, Tom Harris wrote:
>
>> I'm sure this is an easy question (I'm just too dumb to figure it out).
>> 
>> When I run a php script from the shell it always outputs
>> X-Powered-By: PHP/4.0.3pl1
>> Content-type: text/html
>> 
>> Normally I just ignore this, but I've been using cron to run a php script
>> and I'm getting my mailbox cluttered with messages that just contain the
>> above 2 lines.  Is there a way to make the cgi version of php not send those
>> two lines.  I tried changing default_mimetype ="" in the php.ini file but
>> that didn't work.
>> 
>> Thanks
>> 
>> 
>> 
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>> 
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
------end of quote------ 



____________________________________________________________
Cynic:

A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.

[EMAIL PROTECTED]






smime.p7m






> <?
> $c = "0";
> select($c, $id);
>
>
> function select($c, $id) {
>      global $name, $db;
>   $sql = "select * from ref_directory where parent_id = '$id'";
>     $results = pg_exec($db, $sql);
>      if (!$result) {printf ("ERROR"); exit;}
>        for ($pos=0;$pos<pg_numrows($result);$pos++) {
>          $row = pg_fetch_array($result,$pos);
>              $id = $row["id"];
>                if ($result){
>               $c++;
>       $name[$c] = $row[vir_dir_name];
.........................^^^^^^^^^^^^

What is that?
a) a variable; then you must write $row[$vir_dir_name]
b) a string; then you should write $row["vir_dir_name"]

You should know, that variables from outside a function are not visible
inside a function:

$name = "Moritz";

function print()
{
        echo $name;
}

will produce *nothing*;

Instead you must write it like:

$name = "Moritz";
function print()
{
        global $name;
        echo $name;
}

(normally a function should not access a variable from outside, but
sometimes there is no other way...)

Hope it helps,
Moritz.

>      select($c, $id);
>       }
>    $var = 0
>  while $var < $c {
> echo "<option value=\"".$id."\">".$name[$var]."</option>\n";
>   }
> }
> ?>





smime.p7m





Can anyone recommend a place/forum for help in getting PHP to compile under
linux?

I am running into a problem that I haven't gotten any feedback on from
php-dev, php-general or php-install.

The specific problem is:

/usr/bin/ld: .libs/libphp4.so: undefined versioned symbol name
__fp_query@@GLIBC_2.0
/usr/bin/ld: failed to set dynamic section sizes: Bad value

Looks like the linker can't find __fp_query().

- Mark
[EMAIL PROTECTED]





Hello,

I am making a PHP script that makes a JavaScript.  Is there a way in java to
escape a character like in php. (in php you use "\")

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------





Hi!

  yes, you can escape like in php o c.

regards
Marcelo Gulin


Brandon Orther escribió:
> 
> Hello,
> 
> I am making a PHP script that makes a JavaScript.  Is there a way in java to
> escape a character like in php. (in php you use "\")
> 
> Thank you,
> 
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.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]




> 
> Does nobody read the mysql manual anymore these days? :)
> 
> 

well, I read the manual!
but if haven't found anything like "show tables like"!
Where did you find it - or

> No manual searching needed - 

did you only try, and not read???

witty

-- 
Sent through GMX FreeMail - http://www.gmx.net




> 
> Does nobody read the mysql manual anymore these days? :)
> 
> 

well, I read the manual!
but if haven't found anything like "show tables like"!
Where did you find it - or

> No manual searching needed - 

did you only try, and not read???

witty

-- 
Sent through GMX FreeMail - http://www.gmx.net




http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#SHO
W

7.28 SHOW Syntax (Get Information About Tables, Columns,...)

    SHOW DATABASES [LIKE wild]
or SHOW [OPEN] TABLES [FROM db_name] [LIKE wild]
....

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Sander Pilon" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 11:22 AM
Subject: RE: [PHP] Checking whether a MySQL table exists


> >
> > Does nobody read the mysql manual anymore these days? :)
> >
> >
>
> well, I read the manual!
> but if haven't found anything like "show tables like"!
> Where did you find it - or
>
> > No manual searching needed -
>
> did you only try, and not read???
>
> witty
>
> --
> Sent through GMX FreeMail - http://www.gmx.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Hello does anyone know why I get this error when I use this code?  I copied
straight from the PHP.net manual:

---------------------
CODE
---------------------
<?php
session_register ("count");
$count++;
?>

Hello visitor, you have seen this page <?php echo $count; ?> times.<p>

<php?
# the <?=SID?> is necessary to preserve the session id
# in the case that the user has disabled cookies
?>



---------------------
ERROR
---------------------

Warning: open(/tmp\sess_13514d1d70d505416a47639bc7312c58, O_RDWR) failed: m
(2) in C:\Apache\htdocs\br\test.php on line 2
Hello visitor, you have seen this page 1 times.


Warning: open(/tmp\sess_13514d1d70d505416a47639bc7312c58, O_RDWR) failed: m
(2) in Unknown on line 0

Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on line 0

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
--------------------------------------------





It's using the path for unix to save the sessions, and it looks like you're
on windows.  Look for the path directive in the php.ini file and change it
so only the windows path to the sessions save directory is there.

-----------------------------------------------------------------
Jonathan Rosenberg
Be fierce, be fabulous, change the world!



----- Original Message -----
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Monday, January 10, 2000 2:45 PM
Subject: [PHP] Sessions


> Hello does anyone know why I get this error when I use this code?  I
copied
> straight from the PHP.net manual:
>
> ---------------------
> CODE
> ---------------------
> <?php
> session_register ("count");
> $count++;
> ?>
>
> Hello visitor, you have seen this page <?php echo $count; ?> times.<p>
>
> <php?
> # the <?=SID?> is necessary to preserve the session id
> # in the case that the user has disabled cookies
> ?>
>
>
>
> ---------------------
> ERROR
> ---------------------
>
> Warning: open(/tmp\sess_13514d1d70d505416a47639bc7312c58, O_RDWR) failed:
m
> (2) in C:\Apache\htdocs\br\test.php on line 2
> Hello visitor, you have seen this page 1 times.
>
>
> Warning: open(/tmp\sess_13514d1d70d505416a47639bc7312c58, O_RDWR) failed:
m
> (2) in Unknown on line 0
>
> Warning: Failed to write session data (files). Please verify that the
> current setting of session.save_path is correct (/tmp) in Unknown on line
0
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.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]
>





Brandon Orther wrote:

> Hello does anyone know why I get this error when I use this code? 

 >
 > Warning: Failed to write session data (files). Please verify that the
 > current setting of session.save_path is correct (/tmp) in Unknown on 
line 0


Do what this error says to do, unless you have a directory called /tmp 
on your Windows machine.

+------------------------------------------------+
| Julie Meloni ([EMAIL PROTECTED])                  |
| Tech. Director, i2i Interactive (www.i2ii.com) |
|                                                |
|      "PHP Essentials" & "PHP Fast & Easy"      |
|            http://www.thickbook.com/           |
+------------------------------------------------+





I want to process information submitted by a form, but I want to clean up
the info before I use it.   I have about 40 form fields, of several field
types.  If I only had a few form fields, I would do ths manually, but since
I have so many my code will be much neater to do it with a function.  I want
to loop through all the POST vars and do a strip_tags() and trim() on each
one.

Is this how I should be doing this?  The code below works how I want it to.
However, I would prefer, for performance/memory issues to not perform this
on unneeded fields, such as radio buttons and select boxes where the
information is already formatted how I want.  Is there any way to only
perform this on text boxes and textarea fields?  THanks!

foreach ( $HTTP_POST_VARS as $key=>$value )
 {
$value=strip_tags($value);
$value=trim($value);
// for debugging use only  print all the variables from web form
 print "$key = $value<br />";
 }

-----------------------------------------------------------------
Jonathan Rosenberg
Be fierce, be fabulous, change the world!








This is how I usually do it:

<input type="text" name="f[firstname]">

Then you have an array of values in $f

then just do :

while(list($key,$val) = each($f))
{
  $$key = strip_tags($val);
}

Which will then create a variable $firstname and put a strip_tags of $val into
it (leaving your original $f array intact for future use)

--Joe


On Wed, Jan 10, 2001 at 02:45:55PM -0500, Jon Rosenberg wrote:
> I want to process information submitted by a form, but I want to clean up
> the info before I use it.   I have about 40 form fields, of several field
> types.  If I only had a few form fields, I would do ths manually, but since
> I have so many my code will be much neater to do it with a function.  I want
> to loop through all the POST vars and do a strip_tags() and trim() on each
> one.
> 
> Is this how I should be doing this?  The code below works how I want it to.
> However, I would prefer, for performance/memory issues to not perform this
> on unneeded fields, such as radio buttons and select boxes where the
> information is already formatted how I want.  Is there any way to only
> perform this on text boxes and textarea fields?  THanks!
> 
> foreach ( $HTTP_POST_VARS as $key=>$value )
>  {
> $value=strip_tags($value);
> $value=trim($value);
> // for debugging use only  print all the variables from web form
>  print "$key = $value<br />";
>  }
> 
> -----------------------------------------------------------------
> Jonathan Rosenberg
> Be fierce, be fabulous, change the world!
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com





Is there a list anywhere of hte tags this function will strip, I couldn't
find it in the php manual?  I want to know if there are any that might be
left out.  Thanks!

-----------------------------------------------------------------
Jonathan Rosenberg
Be fierce, be fabulous, change the world!








Could someone suggest some options here for performance improvement?

I have a table with about 300,000 entries/records by 7 columns/fields.  All of 
the information varies from entry, but only one field can be declared as UNIQUE.

I have PHP perform SELECT queries on the table, and I need to display the 
results in a format of: "viewing $top to ($top+$depth) of $numrows found"

I haven't found a way to determine $numrows without performing a second SELECT 
in this format:

$numrows = mysql_num_rows (db_query("SELECT * FROM products WHERE 
$product_query"));
if ( $numrows < $depth ) { $depth = $numrows; }
$qid = db_query("SELECT * FROM products WHERE $product_query LIMIT $top, 
$depth");

So, this takes about twice as long as it would without figuring the $numrows.  
Does anyone have any suggestions as far as what can be done to speed this up?  
Assume that the table in question is optimized with indexing and UNIQUE values.

Thanks.

Lee Howard




You can use KEY() which will add extra keys to the table.

--Joe

On Wed, Jan 10, 2001 at 12:58:37PM -0700, [EMAIL PROTECTED] wrote:
> Could someone suggest some options here for performance improvement?
> 
> I have a table with about 300,000 entries/records by 7 columns/fields.  All of 
> the information varies from entry, but only one field can be declared as UNIQUE.
> 
> I have PHP perform SELECT queries on the table, and I need to display the 
> results in a format of: "viewing $top to ($top+$depth) of $numrows found"
> 
> I haven't found a way to determine $numrows without performing a second SELECT 
> in this format:
> 
> $numrows = mysql_num_rows (db_query("SELECT * FROM products WHERE 
> $product_query"));
> if ( $numrows < $depth ) { $depth = $numrows; }
> $qid = db_query("SELECT * FROM products WHERE $product_query LIMIT $top, 
> $depth");
> 
> So, this takes about twice as long as it would without figuring the $numrows.  
> Does anyone have any suggestions as far as what can be done to speed this up?  
> Assume that the table in question is optimized with indexing and UNIQUE values.
> 
> Thanks.
> 
> Lee Howard
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com





You don't need to select all the data to get the number of rows. Try
this:

select count(*) as total from products where $product_query;

Then use total instead of num_rows.
Be sure the elements in your where clause are properly indexed.

[EMAIL PROTECTED] wrote:
> 
> Could someone suggest some options here for performance improvement?
> 
> I have a table with about 300,000 entries/records by 7 columns/fields.  All of
> the information varies from entry, but only one field can be declared as UNIQUE.
> 
> I have PHP perform SELECT queries on the table, and I need to display the
> results in a format of: "viewing $top to ($top+$depth) of $numrows found"
> 
> I haven't found a way to determine $numrows without performing a second SELECT
> in this format:
> 
> $numrows = mysql_num_rows (db_query("SELECT * FROM products WHERE
> $product_query"));
> if ( $numrows < $depth ) { $depth = $numrows; }
> $qid = db_query("SELECT * FROM products WHERE $product_query LIMIT $top,
> $depth");
> 
> So, this takes about twice as long as it would without figuring the $numrows.
> Does anyone have any suggestions as far as what can be done to speed this up?
> Assume that the table in question is optimized with indexing and UNIQUE values.
> 
> Thanks.
> 
> Lee Howard
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




On Wednesday 10 January 2001 20:58, [EMAIL PROTECTED] wrote:

> I have PHP perform SELECT queries on the table, and I need to display
> the results in a format of: "viewing $top to ($top+$depth) of $numrows
> found"
>
> I haven't found a way to determine $numrows without performing a second
> SELECT in this format:

look for mysql_num_rows ()

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

Drink wet cement. Get stoned.




I am working on the nice tutorial at
http://designmagick.50megs.com/postgresql-tutorial/ 

I have my test.php and add.php pages created and just
can't seem to pass variables to the add.php page
-- not even simple things like $user!

phpinfo() shows HTTP_POST_VARS["firstname"] = Jeff so
php knows about the vaariables but
doesn't seem to tell the new page.

What am I doing wrong??

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/




Well if you aren't posting to your add.php page (ie method="post" 
action="add.php") then you need to pass them via the add.php?var=foo&varb=bar 
method. 

--Joe


On Wed, Jan 10, 2001 at 12:02:54PM -0800, jeff fitzmyers wrote:
> I am working on the nice tutorial at
> http://designmagick.50megs.com/postgresql-tutorial/ 
> 
> I have my test.php and add.php pages created and just
> can't seem to pass variables to the add.php page
> -- not even simple things like $user!
> 
> phpinfo() shows HTTP_POST_VARS["firstname"] = Jeff so
> php knows about the vaariables but
> doesn't seem to tell the new page.
> 
> What am I doing wrong??
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com





I have this now:
<form action="add.php" method="post">
I also tried method="get"  -- i can see the variables
in the url too. I have double checked spelling etc.

This line prints nothing - not even a space I think:
printf ("These values were inserted into the database
- %s %s", $firstname, $surname);


--- Joe Stump <[EMAIL PROTECTED]> wrote:
> Well if you aren't posting to your add.php page (ie
> method="post" 
> action="add.php") then you need to pass them via the
> add.php?var=foo&varb=bar 
> method. 
> 
> --Joe
> 
> 
> On Wed, Jan 10, 2001 at 12:02:54PM -0800, jeff
> fitzmyers wrote:
> > I am working on the nice tutorial at
> >
> http://designmagick.50megs.com/postgresql-tutorial/ 
> > 
> > I have my test.php and add.php pages created and
> just
> > can't seem to pass variables to the add.php page
> > -- not even simple things like $user!
> > 
> > phpinfo() shows HTTP_POST_VARS["firstname"] = Jeff
> so
> > php knows about the vaariables but
> > doesn't seem to tell the new page.
> > 
> > What am I doing wrong??
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Photos - Share your holiday photos online!
> > http://photos.yahoo.com/
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 
> ---
> Joe Stump
> PHP Programmer
> www.Care2.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]
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/




This is true, but not complete.  You can also do <form method="get"
action="whatever.php" ...  It will result in a get, as show like this:
add.php?var=foo&varb=bar, but, you don't have to format this URL yourself.

Jeremy

> 
> Well if you aren't posting to your add.php page (ie method="post" 
> action="add.php") then you need to pass them via the add.php?var=foo&varb=bar 
> method. 
> 
> --Joe
> 
> 
> On Wed, Jan 10, 2001 at 12:02:54PM -0800, jeff fitzmyers wrote:
> > I am working on the nice tutorial at
> > http://designmagick.50megs.com/postgresql-tutorial/ 
> > 
> > I have my test.php and add.php pages created and just
> > can't seem to pass variables to the add.php page
> > -- not even simple things like $user!
> > 
> > phpinfo() shows HTTP_POST_VARS["firstname"] = Jeff so
> > php knows about the vaariables but
> > doesn't seem to tell the new page.
> > 
> > What am I doing wrong??
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Photos - Share your holiday photos online!
> > http://photos.yahoo.com/
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> ---
> Joe Stump
> PHP Programmer
> www.Care2.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]
> 
> 





how do you use defines inside of a string...

e.g.

define(MAX,2);
print  "the max is MAX";

this obv does not work....

jeff





> how do you use defines inside of a string...
> 
> e.g.
> 
> define(MAX,2);
> print  "the max is MAX";

print "the max is " . MAX;




print "the max is ".MAX;

--Joe

On Wed, Jan 10, 2001 at 12:12:08PM -0800, jeff saenz wrote:
> how do you use defines inside of a string...
> 
> e.g.
> 
> define(MAX,2);
> print  "the max is MAX";
> 
> this obv does not work....
> 
> jeff
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

---
Joe Stump
PHP Programmer
www.Care2.com





what about inside of a here doc....

print <<<HERE
this is the MAX
HERE

Joe Stump wrote:

> print "the max is ".MAX;
>
> --Joe
>
> On Wed, Jan 10, 2001 at 12:12:08PM -0800, jeff saenz wrote:
> > how do you use defines inside of a string...
> >
> > e.g.
> >
> > define(MAX,2);
> > print  "the max is MAX";
> >
> > this obv does not work....
> >
> > jeff
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> ---
> Joe Stump
> PHP Programmer
> www.Care2.com





I'm not sure about that one - I think most variables work. No better way to find
out than to try it ;o)

--Joe


On Wed, Jan 10, 2001 at 12:21:01PM -0800, jeff saenz wrote:
> what about inside of a here doc....
> 
> print <<<HERE
> this is the MAX
> HERE
> 
> Joe Stump wrote:
> 
> > print "the max is ".MAX;
> >
> > --Joe
> >
> > On Wed, Jan 10, 2001 at 12:12:08PM -0800, jeff saenz wrote:
> > > how do you use defines inside of a string...
> > >
> > > e.g.
> > >
> > > define(MAX,2);
> > > print  "the max is MAX";
> > >
> > > this obv does not work....
> > >
> > > jeff
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > ---
> > Joe Stump
> > PHP Programmer
> > www.Care2.com
> 

---
Joe Stump
PHP Programmer
www.Care2.com





This reminded me of an issue I've kind of been contemplating
for a couple of weeks now... I got sick of having to
connect, query, check for errors, etc. every time I wanted
to query a mysql database, so I wrote a function to do all
of it for me... something like:

function query_db($queryString, $file, $line) {
    // do db stuff
    // if error, die using $file and $line (actually using
constants __FILE__ and __LINE__ only tell me that it died in
this function)
    // return results of query
}

Now, to call the function I've been using:

$result = query_db("SELECT * FROM myTable", __FILE__,
__LINE__);

It'd be nice to be able to get __FILE__ and __LINE__ where
the function was called without passing them as parameters.
Even if I could just define a macro _HERE_ to expand into
__FILE__, __LINE__ it would save me some time...

I know it sounds lazy, but if there was a way so I could
just call

$result = query_db("SELECT * FROM myTable");

it'd be so much nicer...

PS - I don't want to get into db abstraction and all that...
I just wonder if what I'm talking about is easy/possible.

Thanks for input -

--Toby

----- Original Message -----
From: "Moritz Petersen" <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 3:18 PM
Subject: RE: [PHP] constants inside of a string

<snip>





> define(MAX,2);
> print  "the max is MAX";
> 
> this obv does not work....

print "the max is " . MAX;





No.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "<body>"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Wed, 10 Jan 2001, jeff saenz wrote:

> Date: Wed, 10 Jan 2001 12:21:01 -0800
> From: jeff saenz <[EMAIL PROTECTED]>
> To: Joe Stump <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] constants inside of a string
> 
> what about inside of a here doc....
> 
> print <<<HERE
> this is the MAX
> HERE
> 
> Joe Stump wrote:
> 
> > print "the max is ".MAX;
> >
> > --Joe
> >
> > On Wed, Jan 10, 2001 at 12:12:08PM -0800, jeff saenz wrote:
> > > how do you use defines inside of a string...
> > >
> > > e.g.
> > >
> > > define(MAX,2);
> > > print  "the max is MAX";
> > >
> > > this obv does not work....
> > >
> > > jeff
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> > ---
> > Joe Stump
> > PHP Programmer
> > www.Care2.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]
> 
> 





hi
i know i've noticed somewhere something about how to implement a Pause in PHP -
I mean, if ie.a user inputs a wrong number, the script says "Oh no, it's
wrong", waits a few seconds and redirects her back to input form. i know i could
say to him "hit a Back button...", just wondering if something lika Pause
exists. i've searched php.net and zend.com but found nothing useful.
thanks
Bobe




You can do it in PHP, HTML, or JavaScript, but it's only
possible to send the control HTTP header with PHP if there
is no body output sent yet, so PHP is out. I recommend:

<meta http-equiv="refresh" content="<time>; url=<url>">

where <time> is the time to wait before refresh in seconds
and <url> is the _complete_ url to redirect to. Note that
the time and url are both inside the content property; they
are not seperate properties and the above is not a typo.

You can also do it with JS, but AFAIK you're better off with
the above.

--Toby

----- Original Message -----
From: "Robert Ludvik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 3:18 PM
Subject: [PHP] pause


> hi
> i know i've noticed somewhere something about how to
implement a Pause in PHP -
> I mean, if ie.a user inputs a wrong number, the script
says "Oh no, it's
> wrong", waits a few seconds and redirects her back to
input form. i know i could
> say to him "hit a Back button...", just wondering if
something lika Pause
> exists. i've searched php.net and zend.com but found
nothing useful.
> thanks
> Bobe
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>
>





You could use custom HTML meta content refresh tags.  This is not a
PHP think, but an HTML thing.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "<body>"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Wed, 10 Jan 2001, Robert Ludvik wrote:

> Date: Wed, 10 Jan 2001 21:18:38 +0100
> From: Robert Ludvik <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP] pause
> 
> hi
> i know i've noticed somewhere something about how to implement a Pause in PHP -
> I mean, if ie.a user inputs a wrong number, the script says "Oh no, it's
> wrong", waits a few seconds and redirects her back to input form. i know i could
> say to him "hit a Back button...", just wondering if something lika Pause
> exists. i've searched php.net and zend.com but found nothing useful.
> thanks
> Bobe
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 






don't forget javascript!

you could validate the form before posting to php.

DanO


-----Original Message-----
From: jeremy brand [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 1:18 PM
To: Robert Ludvik
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] pause


You could use custom HTML meta content refresh tags.  This is not a
PHP think, but an HTML thing.

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "<body>"   -- Quoted from Yahoo! homepage, http://www.yahoo.com

On Wed, 10 Jan 2001, Robert Ludvik wrote:

> Date: Wed, 10 Jan 2001 21:18:38 +0100
> From: Robert Ludvik <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP] pause
>
> hi
> i know i've noticed somewhere something about how to implement a Pause in
PHP -
> I mean, if ie.a user inputs a wrong number, the script says "Oh no, it's
> wrong", waits a few seconds and redirects her back to input form. i know i
could
> say to him "hit a Back button...", just wondering if something lika Pause
> exists. i've searched php.net and zend.com but found nothing useful.
> thanks
> Bobe
>
> --
> PHP General Mailing List (http://www.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]





Funny, I would say forget javascript; I don't trust client side
validation.  

:)  Just my two cents.

Jeremy 

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   "<body>"   -- Quoted from Yahoo! homepage, http://www.yahoo.com


> don't forget javascript!
> 
> you could validate the form before posting to php.
> 
> DanO
> 
> 
> -----Original Message-----
> From: jeremy brand [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 1:18 PM
> To: Robert Ludvik
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] pause
> 
> 
> You could use custom HTML meta content refresh tags.  This is not a
> PHP think, but an HTML thing.
> 
> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> Get your own Free, Private email at http://www.smackdown.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>    "<body>"   -- Quoted from Yahoo! homepage, http://www.yahoo.com
> 
> On Wed, 10 Jan 2001, Robert Ludvik wrote:
> 
> > Date: Wed, 10 Jan 2001 21:18:38 +0100
> > From: Robert Ludvik <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] pause
> >
> > hi
> > i know i've noticed somewhere something about how to implement a Pause in
> PHP -
> > I mean, if ie.a user inputs a wrong number, the script says "Oh no, it's
> > wrong", waits a few seconds and redirects her back to input form. i know i
> could
> > say to him "hit a Back button...", just wondering if something lika Pause
> > exists. i've searched php.net and zend.com but found nothing useful.
> > thanks
> > Bobe
> >
> > --
> > PHP General Mailing List (http://www.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]
> 
> 





If you find something other than client side validation, let me know please.
I had to resort to VBScript and I hate it!

----- Original Message -----
From: "jeremy brand" <[EMAIL PROTECTED]>
To: "DanO" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 4:42 PM
Subject: RE: [PHP] pause


> Funny, I would say forget javascript; I don't trust client side
> validation.
>
> :)  Just my two cents.
>
> Jeremy
>
> Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 ::
[EMAIL PROTECTED]
> http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> Get your own Free, Private email at http://www.smackdown.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>    "<body>"   -- Quoted from Yahoo! homepage, http://www.yahoo.com
>
>
> > don't forget javascript!
> >
> > you could validate the form before posting to php.
> >
> > DanO
> >
> >
> > -----Original Message-----
> > From: jeremy brand [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 10, 2001 1:18 PM
> > To: Robert Ludvik
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [PHP] pause
> >
> >
> > You could use custom HTML meta content refresh tags.  This is not a
> > PHP think, but an HTML thing.
> >
> > Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 ::
[EMAIL PROTECTED]
> > http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
> > Get your own Free, Private email at http://www.smackdown.com/
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >    "<body>"   -- Quoted from Yahoo! homepage, http://www.yahoo.com
> >
> > On Wed, 10 Jan 2001, Robert Ludvik wrote:
> >
> > > Date: Wed, 10 Jan 2001 21:18:38 +0100
> > > From: Robert Ludvik <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] pause
> > >
> > > hi
> > > i know i've noticed somewhere something about how to implement a Pause
in
> > PHP -
> > > I mean, if ie.a user inputs a wrong number, the script says "Oh no,
it's
> > > wrong", waits a few seconds and redirects her back to input form. i
know i
> > could
> > > say to him "hit a Back button...", just wondering if something lika
Pause
> > > exists. i've searched php.net and zend.com but found nothing useful.
> > > thanks
> > > Bobe
> > >
> > > --
> > > PHP General Mailing List (http://www.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]
>





Here is a simple XSL output buffer class. Whenever you need to output
something (to be later transformed) just call addXMLData(). When you are
done adding your content, load a template then outputXSL() the data. If you
need to output error messages while dubugging, just echo like normal. It
will not interfere with the transformation. Just remember to maintain valid
XML syntax to the data you add. If it is in an incorrect format, you will
have problems.

PS> Ignore loadTemplate(). Feel free to re-implement this as you see fit.

Mike


----- Original Message -----
From: "Siim Einfeldt aka Itpunk" <[EMAIL PROTECTED]>
To: "Michael Bell" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, December 30, 2000 10:33 AM
Subject: Re: [PHP] XML


>
>   Thank you for the good introduction. Have you got some working code
> which does the exact thing you`re describing?php->XML->XSLT->HTML and
> maybe some databases too?  If you had, I`d appreciate if you could send me
> something. Let me know, thanks.
>
> Siim Einfeldt
>
> > XML directly is the IE issue you are refering to. XML is a set of rules
> > (such as HTML is) that are ment to be interperted by something. An ideal
> > setup (for a web-based application) is this:
> > 1) PHP executes code that creates XML data as it's output (instead of
just
> > echo'ing it to the screen)
> > 2) XSLT (see manual) translates the XML that was generated into HTML
which
> > is what is sent to the browser.
> >
> > This allows you to create a seperation between PHP code and HTML output.
You
> > loose speed in the long run but it is sometimes worth it. If you are
however
> > going to be talking directly with a piece of software capable of
> > understanding the XML directly, you don't need to do any translating
from
> > XML to HTML.
> >
> > This is a VERY, VERY, VERY minimal overview on the issue.
> >
> > Mike
> >
> >
> > ----- Original Message -----
> > From: "Siim Einfeldt aka Itpunk" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, December 27, 2000 2:14 PM
> > Subject: [PHP] XML
> >
> >
> > >
> > > hi,
> > >
> > >   I`d like to know a bit more about combining xml-php-mysql in web
> > > applications (or just sites). I`ve read somewhere that it can only be
> > > used properly starting from IE5, but I`m almost sure this isn`t the
> > > case. Could someone point me to some really informative site or
explain
> > > this (...topics concerning using XML) a bit?
> > >
> > >
> > > Thanks
> > > Siim Einfeldt
> > > [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]
> > >
> > >
> >
>
>




Are there any programs that have a graphical interface like dreamweaver for PHP?




Marcus Ouimet wrote:

> Are there any programs that have a graphical interface like dreamweaver for
> PHP?

Are you aware what PHP actually IS? Graphical frontends for programming 
languages are usually used only for the GUI part. What would you expect? 
Something to write your code for you? There isn't anything yet that really 
takes that burden off your shoulders, except douwnloadable libraries and 
possible that "codecharge" thing which I frankly don't know anything about 
except that it generates code to some extent and ist still beta and quite 
buggy.

reagards
Wagner

-- 
One maniac alone can do what 20 together cannot




I suppose he was rather referring to a development IDE. Anyway, you could
very loosely consider HTML to be a programming language, too, and
Dreamweaver is an IDE for HTML.

And, graphical frontends are -by far- not only used for the GUI part. Take a
look at VC++, Delphi, etc. You could even consider notepad.exe to be a
graphical interface for programming.

"Alexander Wagner" <[EMAIL PROTECTED]> a écrit dans le message news:
[EMAIL PROTECTED]
> Marcus Ouimet wrote:
>
> > Are there any programs that have a graphical interface like dreamweaver
for
> > PHP?
>
> Are you aware what PHP actually IS? Graphical frontends for programming
> languages are usually used only for the GUI part. What would you expect?
> Something to write your code for you? There isn't anything yet that really
> takes that burden off your shoulders, except douwnloadable libraries and
> possible that "codecharge" thing which I frankly don't know anything about
> except that it generates code to some extent and ist still beta and quite
> buggy.
>
> reagards
> Wagner
>
> --
> One maniac alone can do what 20 together cannot
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






It was a long shot but you never know till you ask. Only reason I was
wondering about this wasn't to have a program do the work for me, I just
thought a visual layout for some things would help while working with PHP -
since it is embedded in the html coding making layout a pain sometimes. I am
really new to PHP, I previously used perl for all my coding.

----- Original Message -----
From: "Alexander Wagner" <[EMAIL PROTECTED]>
To: "Marcus Ouimet" <[EMAIL PROTECTED]>; "PHP"
<[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 1:05 PM
Subject: Re: [PHP] Dreamwever for PHP?


> Marcus Ouimet wrote:
>
> > Are there any programs that have a graphical interface like dreamweaver
for
> > PHP?
>
> Are you aware what PHP actually IS? Graphical frontends for programming
> languages are usually used only for the GUI part. What would you expect?
> Something to write your code for you? There isn't anything yet that really
> takes that burden off your shoulders, except douwnloadable libraries and
> possible that "codecharge" thing which I frankly don't know anything about
> except that it generates code to some extent and ist still beta and quite
> buggy.
>
> reagards
> Wagner
>
> --
> One maniac alone can do what 20 together cannot
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





Hey, I keep getting the same error messages when trying to fire up sessions in this 
code i wrote. i've written some test scripts to test sessions on my machine, and they 
are working, so the problem must lie within my code. Here' what I'm getting, anyone 
know how to resolve this?

Warning: Cannot send session cookie - headers already sent by (output started at 
C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14

Warning: Cannot send session cache limiter - headers already sent (output started at 
C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14


wpdbcon.php --------------

<?
$db = "mydb";
$user = "mybot";
$pw = "mypw";
$mysql_access = mysql_connect("localhost", $user, $pw);
mysql_select_db($db, $mysql_access);

session_start();

if (!session_is_registered('cart') {
$cart = array();
session_register('cart');
}

?>

i also tried doing 

if (!session_is_registered('cart') {
$cart = array();
session_register('cart');
}
else {
session_start();
}

i thought it was sending conflicting data when it was trying to initialize, didn't 
work either.

thanks in advance.




Make sure that the <? that starts the php script is the VERY first line of
the file, and that there are NO spaces before it anywhere.

I had the same problem, I was used to html and even PHP being rather syntax
flexible.
As soon as I removed the spaces and extra line at the beginning of the file,
life was back to normal.

Let me know if this works. I'm curious....

----- Original Message -----
From: "JB" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 9:04 AM
Subject: [PHP] Session Errors, do you recognize?


Hey, I keep getting the same error messages when trying to fire up sessions
in this code i wrote. i've written some test scripts to test sessions on my
machine, and they are working, so the problem must lie within my code. Here'
what I'm getting, anyone know how to resolve this?

Warning: Cannot send session cookie - headers already sent by (output
started at C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14

Warning: Cannot send session cache limiter - headers already sent (output
started at C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14


wpdbcon.php --------------

<?
$db = "mydb";
$user = "mybot";
$pw = "mypw";
$mysql_access = mysql_connect("localhost", $user, $pw);
mysql_select_db($db, $mysql_access);

session_start();

if (!session_is_registered('cart') {
$cart = array();
session_register('cart');
}

?>

i also tried doing

if (!session_is_registered('cart') {
$cart = array();
session_register('cart');
}
else {
session_start();
}

i thought it was sending conflicting data when it was trying to initialize,
didn't work either.

thanks in advance.






One more thing after looking at the code. Try this:
<?
session_start();

$db = "mydb";
$user = "mybot";
$pw = "mypw";
$mysql_access = mysql_connect("localhost", $user, $pw);
mysql_select_db($db, $mysql_access);

if (!session_is_registered('cart') {
$cart = array();
session_register('cart');
}

?>


----- Original Message -----
From: "JB" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 9:04 AM
Subject: [PHP] Session Errors, do you recognize?


Hey, I keep getting the same error messages when trying to fire up sessions
in this code i wrote. i've written some test scripts to test sessions on my
machine, and they are working, so the problem must lie within my code. Here'
what I'm getting, anyone know how to resolve this?

Warning: Cannot send session cookie - headers already sent by (output
started at C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14

Warning: Cannot send session cache limiter - headers already sent (output
started at C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14


wpdbcon.php --------------

<?
$db = "mydb";
$user = "mybot";
$pw = "mypw";
$mysql_access = mysql_connect("localhost", $user, $pw);
mysql_select_db($db, $mysql_access);

session_start();

if (!session_is_registered('cart') {
$cart = array();
session_register('cart');
}

?>

i also tried doing

if (!session_is_registered('cart') {
$cart = array();
session_register('cart');
}
else {
session_start();
}

i thought it was sending conflicting data when it was trying to initialize,
didn't work either.

thanks in advance.






actually.. still give me the same error after i fixed that. new code as
follows along with the error:

if (!session_is_registered('cart')) {
$cart = array();
session_register('cart');
}
else {
session_start();
}

?>


Warning: Cannot send session cookie - headers already sent by (output
started at C:\Program Files\Apache Group\Apache\htdocs/store/index.php:2) in
../../wpdbcon.php on line 14

Warning: Cannot send session cache limiter - headers already sent (output
started at C:\Program Files\Apache Group\Apache\htdocs/store/index.php:2) in
../../wpdbcon.php on line 14


any other ideas?   =)

thanks



> You are missing a parentheses:
>
> if (!session_is_registered('cart') {
>
> correct:
> if (!session_is_registered('cart')) {
>                                   ^
> -----Original Message-----
> From: JB [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 6:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Session Errors, do you recognize?
>
>
> Hey, I keep getting the same error messages when trying to fire up
sessions
> in this code i wrote. i've written some test scripts to test sessions on
my
> machine, and they are working, so the problem must lie within my code.
Here'
> what I'm getting, anyone know how to resolve this?
>
> Warning: Cannot send session cookie - headers already sent by (output
> started at C:\Program Files\Apache
> Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14
>
> Warning: Cannot send session cache limiter - headers already sent (output
> started at C:\Program Files\Apache
> Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14
>
>
> wpdbcon.php --------------
>
> <?
> $db = "mydb";
> $user = "mybot";
> $pw = "mypw";
> $mysql_access = mysql_connect("localhost", $user, $pw);
> mysql_select_db($db, $mysql_access);
>
> session_start();
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
>
> ?>
>
> i also tried doing
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
> else {
> session_start();
> }
>
> i thought it was sending conflicting data when it was trying to
initialize,
> didn't work either.
>
> thanks in advance.
>
>





what's on line 2 of your index.php?  You appear to be sending output
before starting your session.  Have you tried including wpdbcon.php
before you do anything in your index.php?

-jm

-----Original Message-----
From: JB [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 6:48 AM
To: Brandon Orther; [EMAIL PROTECTED]
Subject: Re: [PHP] Session Errors, do you recognize?


actually.. still give me the same error after i fixed that. new code as
follows along with the error:

if (!session_is_registered('cart')) {
$cart = array();
session_register('cart');
}
else {
session_start();
}

?>


Warning: Cannot send session cookie - headers already sent by (output
started at C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in
../../wpdbcon.php on line 14

Warning: Cannot send session cache limiter - headers already sent
(output
started at C:\Program Files\Apache
Group\Apache\htdocs/store/index.php:2) in
../../wpdbcon.php on line 14


any other ideas?   =)

thanks



> You are missing a parentheses:
>
> if (!session_is_registered('cart') {
>
> correct:
> if (!session_is_registered('cart')) {
>                                   ^
> -----Original Message-----
> From: JB [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 6:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Session Errors, do you recognize?
>
>
> Hey, I keep getting the same error messages when trying to fire up
sessions
> in this code i wrote. i've written some test scripts to test sessions
on
my
> machine, and they are working, so the problem must lie within my code.
Here'
> what I'm getting, anyone know how to resolve this?
>
> Warning: Cannot send session cookie - headers already sent by (output
> started at C:\Program Files\Apache
> Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14
>
> Warning: Cannot send session cache limiter - headers already sent
(output
> started at C:\Program Files\Apache
> Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14
>
>
> wpdbcon.php --------------
>
> <?
> $db = "mydb";
> $user = "mybot";
> $pw = "mypw";
> $mysql_access = mysql_connect("localhost", $user, $pw);
> mysql_select_db($db, $mysql_access);
>
> session_start();
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
>
> ?>
>
> i also tried doing
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
> else {
> session_start();
> }
>
> i thought it was sending conflicting data when it was trying to
initialize,
> didn't work either.
>
> thanks in advance.
>
>


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




yea.. it worked. thanks.


----- Original Message -----
From: Shane McBride <[EMAIL PROTECTED]>
To: JB <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 9:44 PM
Subject: Re: [PHP] Session Errors, do you recognize?


> One more thing after looking at the code. Try this:
> <?
> session_start();
>
> $db = "mydb";
> $user = "mybot";
> $pw = "mypw";
> $mysql_access = mysql_connect("localhost", $user, $pw);
> mysql_select_db($db, $mysql_access);
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
>
> ?>
>
>
> ----- Original Message -----
> From: "JB" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 10, 2001 9:04 AM
> Subject: [PHP] Session Errors, do you recognize?
>
>
> Hey, I keep getting the same error messages when trying to fire up
sessions
> in this code i wrote. i've written some test scripts to test sessions on
my
> machine, and they are working, so the problem must lie within my code.
Here'
> what I'm getting, anyone know how to resolve this?
>
> Warning: Cannot send session cookie - headers already sent by (output
> started at C:\Program Files\Apache
> Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14
>
> Warning: Cannot send session cache limiter - headers already sent (output
> started at C:\Program Files\Apache
> Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14
>
>
> wpdbcon.php --------------
>
> <?
> $db = "mydb";
> $user = "mybot";
> $pw = "mypw";
> $mysql_access = mysql_connect("localhost", $user, $pw);
> mysql_select_db($db, $mysql_access);
>
> session_start();
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
>
> ?>
>
> i also tried doing
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
> else {
> session_start();
> }
>
> i thought it was sending conflicting data when it was trying to
initialize,
> didn't work either.
>
> thanks in advance.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>





For those of you using Interbase:
Chris

CERT Advisory CA-2001-01 Interbase Server Contains Compiled-in Back Door
Account

   Original release date: January 10, 2001
   Last revised: --
   Source: CERT/CC

   A complete revision history is at the end of this file.

Systems Affected

     * Borland/Inprise Interbase 4.x and 5.x
     * Open source Interbase 6.0 and 6.01
     * Open source Firebird 0.9-3 and earlier

Overview

   Interbase is an open source database package that had previously been
   distributed in a closed source fashion by Borland/Inprise. Both the
   open and closed source verisions of the Interbase server contain a
   compiled-in back door account with a known password.

I. Description

   Interbase is an open source database package that is distributed by
   Borland/Inprise at http://www.borland.com/interbase/ and on
   SourceForge. The Firebird Project, an alternate Interbase package, is
   also distributed on SourceForge. The Interbase server for both
   distributions contains a compiled-in back door account with a fixed,
   easily located plaintext password. The password and account are
   contained in source code and binaries previously made available at the
   following sites:

          http://www.borland.com/interbase/
          http://sourceforge.net/projects/interbase
          http://sourceforge.net/projects/firebird
          http://firebird.sourceforge.net
          http://www.ibphoenix.com
          http://www.interbase2000.com

   This back door allows any local user or remote user able to access
   port 3050/tcp [gds_db] to manipulate any database object on the
   system. This includes the ability to install trapdoors or other trojan
   horse software in the form of stored procedures. In addition, if the
   database software is running with root privileges, then any file on
   the server's file system can be overwritten, possibly leading to
   execution of arbitrary commands as root.

   This vulnerability was not introduced by unauthorized modifications to
   the original vendor's source. It was introduced by maintainers of the
   code within Borland. The back door account password cannot be changed
   using normal operational commands, nor can the account be deleted from
   existing vulnerable servers [see References].

   This vulnerability has been assigned the identifier CAN-2001-0008 by
   the Common Vulnerabilities and Exposures (CVE) group:

          http://cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2001-0008

   The CERT/CC has not received reports of this back door being exploited
   at the current time. We do recommend, however, that all affected sites
   and redistributors of Interbase products or services follow the
   recommendations suggested in Section III, as soon as possible due to
   the seriousness of this issue.

II. Impact

   Any local user or remote user able to access port 3050/tcp [gds_db]
   can manipulate any database object on the system. This includes the
   ability to install trapdoors or other trojan horse software in the
   form of stored procedures. In addition, if the database software is
   running with root privileges, then any file on the server's file
   system can be overwritten, possibly leading to execution of arbitrary
   commands as root.

III. Solution

Apply a vendor-supplied patch

   Both Borland and The Firebird Project on SourceForge have published
   fixes for this problem. Appendix A contains information provided by
   vendors supplying these fixes. We will update the appendix as we
   receive more information. If you do not see your vendor's name, the
   CERT/CC did not hear from that vendor. Please contact your vendor
   directly.

   Users who are more comfortable making their own changes in source code
   may find the new code available on SourceForge useful as well:

          http://sourceforge.net/projects/interbase
          http://sourceforge.net/projects/firebird

Block access to port 3050/tcp

   This will not, however, prevent local users or users within a
   firewall's adminstrative boundary from accessing the back door
   account. In addition, the port the Interbase server listens on may be
   changed dynamically at startup.

Appendix A. Vendor Information

Borland

   Please see:

          http://www.borland.com/interbase/

IBPhoenix

   The Firebird project uncovered serious security problems with
   InterBase. The problems are fixed in Firebird build 0.9.4 for all
   platforms. If you are running either InterBase V6 or Firebird 0.9.3,
   you should upgrade to Firebird 0.9.4.

   These security holes affect all version of InterBase shipped since
   1994, on all platforms.

   For those who can not upgrade, Jim Starkey developed a patch program
   that will correct the more serious problems in any version of
   InterBase on any platform. IBPhoenix chose to release the program
   without charge, given the nature of the problem and our relationship
   to the community.

   At the moment, name service is not set up to the machine that is
   hosting the patch, so you will have to use the IP number both for the
   initial contact and for the ftp download.

   To start, point your browser at

          http://firebird.ibphoenix.com/

Apple

   The referenced database package is not packaged with Mac OS X or Mac
   OS X Server.

Fujitsu

   Fujitsu's UXP/V operating system is not affected by this problem
   because we don't support the relevant database.

References

    1. VU#247371: Borland/Inprise Interbase SQL database server contains
       backdoor superuser account with known password CERT/CC,
       01/10/2001, https://www.kb.cert.org/vuls/id/247371
     _________________________________________________________________

   Author: This document was written by Jeffrey S Havrilla. Feedback on
   this advisory is appreciated.
   ______________________________________________________________________

   This document is available from:
   http://www.cert.org/advisories/CA-2001-01.html
   ______________________________________________________________________

CERT/CC Contact Information

   Email: [EMAIL PROTECTED]
          Phone: +1 412-268-7090 (24-hour hotline)
          Fax: +1 412-268-6989
          Postal address:
          CERT Coordination Center
          Software Engineering Institute
          Carnegie Mellon University
          Pittsburgh PA 15213-3890
          U.S.A.

   CERT personnel answer the hotline 08:00-20:00 EST(GMT-5) / EDT(GMT-4)
   Monday through Friday; they are on call for emergencies during other
   hours, on U.S. holidays, and on weekends.

Using encryption

   We strongly urge you to encrypt sensitive information sent by email.
   Our public PGP key is available from

   http://www.cert.org/CERT_PGP.key

   If you prefer to use DES, please call the CERT hotline for more
   information.

Getting security information

   CERT publications and other security information are available from
   our web site

   http://www.cert.org/

   To subscribe to the CERT mailing list for advisories and bulletins,
   send email to [EMAIL PROTECTED] Please include in the body of your
   message

   subscribe cert-advisory

   * "CERT" and "CERT Coordination Center" are registered in the U.S.
   Patent and Trademark Office.
   ______________________________________________________________________

   NO WARRANTY
   Any material furnished by Carnegie Mellon University and the Software
   Engineering Institute is furnished on an "as is" basis. Carnegie
   Mellon University makes no warranties of any kind, either expressed or
   implied as to any matter including, but not limited to, warranty of
   fitness for a particular purpose or merchantability, exclusivity or
   results obtained from use of the material. Carnegie Mellon University
   does not make any warranty of any kind with respect to freedom from
   patent, trademark, or copyright infringement.
     _________________________________________________________________

   Conditions for use, disclaimers, and sponsorship information

   Copyright 2001 Carnegie Mellon University.

   Revision History
January 10, 2001:  Initial release





I'm pleased to announce the third public release of php_imlib, an
extension for PHP 4 that makes the Imlib2 image manipulation library
available from within PHP scripts.

New in this release is support for color ranges (gradients), blurring and
sharpening of images, and quality/compression settings for jpegs and pngs.
There are also three bugfixes in 0.3: Incorrect behavior blending images
with alpha channels has been fixed, compatibility with PHP 4.0.4 has been
fixed, and pass-by-reference variables are now done in a cleaner fashion.

Further information on the extension, API documentation, and some example
scripts, are available at

http://mmcc.cx/php_imlib/

The extension itself is available at

http://mmcc.cx/php_imlib/php_imlib-0.3.tar.gz

Enjoy,
Matt






actually.. still give me the same error after i fixed that. new code as
follows along with the error:

if (!session_is_registered('cart')) {
$cart = array();
session_register('cart');
}
else {
session_start();
}

?>


Warning: Cannot send session cookie - headers already sent by (output
started at C:\Program Files\Apache Group\Apache\htdocs/store/index.php:2) in
../../wpdbcon.php on line 14

Warning: Cannot send session cache limiter - headers already sent (output
started at C:\Program Files\Apache Group\Apache\htdocs/store/index.php:2) in
../../wpdbcon.php on line 14


any other ideas?   =)

thanks



> You are missing a parentheses:
>
> if (!session_is_registered('cart') {
>
> correct:
> if (!session_is_registered('cart')) {
>                                   ^
> -----Original Message-----
> From: JB [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 6:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Session Errors, do you recognize?
>
>
> Hey, I keep getting the same error messages when trying to fire up
sessions
> in this code i wrote. i've written some test scripts to test sessions on
my
> machine, and they are working, so the problem must lie within my code.
Here'
> what I'm getting, anyone know how to resolve this?
>
> Warning: Cannot send session cookie - headers already sent by (output
> started at C:\Program Files\Apache
> Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14
>
> Warning: Cannot send session cache limiter - headers already sent (output
> started at C:\Program Files\Apache
> Group\Apache\htdocs/store/index.php:2) in ../../wpdbcon.php on line 14
>
>
> wpdbcon.php --------------
>
> <?
> $db = "mydb";
> $user = "mybot";
> $pw = "mypw";
> $mysql_access = mysql_connect("localhost", $user, $pw);
> mysql_select_db($db, $mysql_access);
>
> session_start();
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
>
> ?>
>
> i also tried doing
>
> if (!session_is_registered('cart') {
> $cart = array();
> session_register('cart');
> }
> else {
> session_start();
> }
>
> i thought it was sending conflicting data when it was trying to
initialize,
> didn't work either.
>
> thanks in advance.
>
>





Hi. Does anybody knows how to have different configuration options, that is,
different php.ini files, for several different sites that reside on the same
server?
I have IIS and the CGI version of PHP 4.04.

Thanks in advace.





How can I get a random number

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
-------------------------------------------- 




try

http://www.php.net/manual/function.rand.php

Brandon Orther wrote:

> How can I get a random number
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.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]





You can blow some ping pong balls around in an enclosure and pick one,
that's pretty random :)

For the next best thing to "random", you can use the rand() function in
PHP.

Brandon Orther wrote:
> 
> How can I get a random number
> 
> Thank you,
> 
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.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]




This is what I have used:

$token = md5(uniqid(rand()));


----- Original Message ----- 
From: "Brandon Orther" <[EMAIL PROTECTED]>
To: "PHP User Group" <[EMAIL PROTECTED]>
Sent: Monday, January 10, 2000 5:13 PM
Subject: [PHP] How can I get a random number


> How can I get a random number
> 
> Thank you,
> 
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.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]





<?
srand((double)microtime()*1000000);
        $id = rand(1,10000000000);

echo ("$id");
?>

-----Original Message-----
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 10, 2000 5:14 PM
To: PHP User Group
Subject: [PHP] How can I get a random number


How can I get a random number

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.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]





Put a web cam on it and we've got a winner!  :)

Cal

-----Original Message-----
From: Monte Ohrt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 4:21 PM
To: [EMAIL PROTECTED]; Brandon Orther
Subject: Re: [PHP] How can I get a random number


You can blow some ping pong balls around in an enclosure and pick one,
that's pretty random :)

For the next best thing to "random", you can use the rand() function in
PHP.

Brandon Orther wrote:
> 
> How can I get a random number
> 
> Thank you,
> 
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.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]







Through recognition technologies this will work nicely, am looking forward
to it.  The key is using oversized ping pong balls as to allow oversized
letters, about a 8" radius ping pong ball will work.  Be sure to use black
ink.  Also, keep in mind that ink increases weight so use balancing
ink, similar to what one uses for tires (although tires use lead, not
ink).  The balancing ink should be transparent as to create a square
plot, this way the ink will be evenly distributed on each ping pong ball 
as to create a truly random result.  Granted it's a subtle difference but
we DO want a random result.

The trick is getting the camera to read the ping pong ball, read the
manual on that.  Some have inserted transmitters within the balls but that
creates needless costs so it's not suggested.

philip

On Wed, 10 Jan 2001, Cal Evans wrote:

> Put a web cam on it and we've got a winner!  :)
> 
> Cal
> 
> -----Original Message-----
> From: Monte Ohrt [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 4:21 PM
> To: [EMAIL PROTECTED]; Brandon Orther
> Subject: Re: [PHP] How can I get a random number
> 
> 
> You can blow some ping pong balls around in an enclosure and pick one,
> that's pretty random :)
> 
> For the next best thing to "random", you can use the rand() function in
> PHP.
> 
> Brandon Orther wrote:
> > 
> > How can I get a random number
> > 
> > Thank you,
> > 
> > --------------------------------------------
> > Brandon Orther
> > WebIntellects Design/Development Manager
> > [EMAIL PROTECTED]
> > 800-994-6364
> > www.webintellects.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 General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 






We may as we set it up in space
to minimalize gravity and friction
-can't be adding any predictable forces ;)

Jerry Lake

-----Original Message-----
From: Philip Olson [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 3:19 PM
To: Cal Evans
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] How can I get a random number



Through recognition technologies this will work nicely, am looking forward
to it.  The key is using oversized ping pong balls as to allow oversized
letters, about a 8" radius ping pong ball will work.  Be sure to use black
ink.  Also, keep in mind that ink increases weight so use balancing
ink, similar to what one uses for tires (although tires use lead, not
ink).  The balancing ink should be transparent as to create a square
plot, this way the ink will be evenly distributed on each ping pong ball
as to create a truly random result.  Granted it's a subtle difference but
we DO want a random result.

The trick is getting the camera to read the ping pong ball, read the
manual on that.  Some have inserted transmitters within the balls but that
creates needless costs so it's not suggested.

philip

On Wed, 10 Jan 2001, Cal Evans wrote:

> Put a web cam on it and we've got a winner!  :)
>
> Cal
>
> -----Original Message-----
> From: Monte Ohrt [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 4:21 PM
> To: [EMAIL PROTECTED]; Brandon Orther
> Subject: Re: [PHP] How can I get a random number
>
>
> You can blow some ping pong balls around in an enclosure and pick one,
> that's pretty random :)
>
> For the next best thing to "random", you can use the rand() function in
> PHP.
>
> Brandon Orther wrote:
> >
> > How can I get a random number
> >
> > Thank you,
> >
> > --------------------------------------------
> > Brandon Orther
> > WebIntellects Design/Development Manager
> > [EMAIL PROTECTED]
> > 800-994-6364
> > www.webintellects.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 General Mailing List (http://www.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]







Good idea!

I hear MIR is for sale.  This could make a good PHP random function, one
that always works!  Let's pool our resources and get on it.  Great thing
is, no need for these mysterious seeds.

philip


On Wed, 10 Jan 2001, Jerry Lake wrote:

> We may as we set it up in space
> to minimalize gravity and friction
> -can't be adding any predictable forces ;)
> 
> Jerry Lake
> 
> -----Original Message-----
> From: Philip Olson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 3:19 PM
> To: Cal Evans
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] How can I get a random number
> 
> 
> 
> Through recognition technologies this will work nicely, am looking forward
> to it.  The key is using oversized ping pong balls as to allow oversized
> letters, about a 8" radius ping pong ball will work.  Be sure to use black
> ink.  Also, keep in mind that ink increases weight so use balancing
> ink, similar to what one uses for tires (although tires use lead, not
> ink).  The balancing ink should be transparent as to create a square
> plot, this way the ink will be evenly distributed on each ping pong ball
> as to create a truly random result.  Granted it's a subtle difference but
> we DO want a random result.
> 
> The trick is getting the camera to read the ping pong ball, read the
> manual on that.  Some have inserted transmitters within the balls but that
> creates needless costs so it's not suggested.
> 
> philip
> 
> On Wed, 10 Jan 2001, Cal Evans wrote:
> 
> > Put a web cam on it and we've got a winner!  :)
> >
> > Cal
> >
> > -----Original Message-----
> > From: Monte Ohrt [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 10, 2001 4:21 PM
> > To: [EMAIL PROTECTED]; Brandon Orther
> > Subject: Re: [PHP] How can I get a random number
> >
> >
> > You can blow some ping pong balls around in an enclosure and pick one,
> > that's pretty random :)
> >
> > For the next best thing to "random", you can use the rand() function in
> > PHP.
> >
> > Brandon Orther wrote:
> > >
> > > How can I get a random number
> > >
> > > Thank you,
> > >
> > > --------------------------------------------
> > > Brandon Orther
> > > WebIntellects Design/Development Manager
> > > [EMAIL PROTECTED]
> > > 800-994-6364
> > > www.webintellects.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 General Mailing List (http://www.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]
> 






Is there a PHP simulator for NT?  One that can be used for testing and
development?

Todd

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]






there's an implementation of PHP for IIS.

-----Original Message-----
From: Todd Cary [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 4:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP simulator


Is there a PHP simulator for NT?  One that can be used for testing and
development?

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]






I just installed Apache, PHP, and MySQL onto my personal NT (ok Win2K)
machine for testing and development.  It was really simple...took less than
an hour total to get working.

John Guynn

This email brought to you by RFCs 821 and 1225.


-----Original Message-----
From: Todd Cary [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 10, 2001 4:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP simulator


Is there a PHP simulator for NT?  One that can be used for testing and
development?




> Is there a PHP simulator for NT?  One that can be used for
testing and
> development?

Generally a staging/development server is the way to go
about testing... just set up a server that duplicates the
environment of the server you'll eventually be using... ie,
install PHP with the same options... create just like you're
publishing on that server. Any problems you run into just
won't be on the public site. When you've got it all worked
out, just copy everything over.

Did I completely miss the point?

-Toby






Why just simulate it when you can run the real thing!  Just download Apache
for Windows and install as service.  Then install PHP for Windows and with
a little
configuration you are set.  I have been using this setup a while now as a
"staging/testing" area before I upload my files to my website provider.
Works pretty slick.

John




"Todd Cary" <[EMAIL PROTECTED]> on 01/10/2001 04:14:48 PM

To:   "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
cc:

Subject:  [PHP] PHP simulator


Is there a PHP simulator for NT?  One that can be used for testing and
development?

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]













Toby -

<<<
Did I completely miss the point?
>>>
Yes and No.  I have my Win 2K system in my office on which I do PHP
development.  However, sometimes I am on the road with a "simple"
Notebook computer (450 MHz and 6 GHz drive).  It would be nice to "play
around" with PHP and see if it will run.

Todd

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]






John -

That sounds feasible.  I have always associated Apache with Unix/Linux;
not Windows....

The install of PHP 4.0.4 on my Win 2K was an absolute breeze running IIS
5.  What is Apache like in the Windows envirnoment?

Todd

--
Todd Cary
Ariste Software
[EMAIL PROTECTED]






On Wed, 10 Jan 2001, Todd Cary wrote:

> Toby -
>
> <<<
> Did I completely miss the point?
> >>>
> Yes and No.  I have my Win 2K system in my office on which I do PHP
> development.  However, sometimes I am on the road with a "simple"
> Notebook computer (450 MHz and 6 GHz drive).  It would be nice to "play
> around" with PHP and see if it will run.
>
> Todd
>
> --
> Todd Cary
> Ariste Software
> [EMAIL PROTECTED]
>

Simple? That's better than mine :)

But seriously, as long as you can run some sort of webserver (Xitami isn't bad
if you need something lite), you can use PHP as it was meant to be (no flames
please).

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>





Hello Todd,

Wednesday, January 10, 2001, 15:08:12 PM, you wrote:

TC> Toby -

TC> <<<
TC> Did I completely miss the point?
>>>>
TC> Yes and No.  I have my Win 2K system in my office on which I do PHP
TC> development.  However, sometimes I am on the road with a "simple"
TC> Notebook computer (450 MHz and 6 GHz drive).  It would be nice to "play
TC> around" with PHP and see if it will run.

this is what I do all the time.

On my laptop i have apache, mysql and php.  cant have a better
similator than that




-- 
DSig                                 `````
David Tod Sigafoos                  ( O O )
mailto:[EMAIL PROTECTED] _______oOOo__( )__oOOo_______

Using 'The Bat' 1.48f






[about experimenting with php on win95/98]
O, ok. Then the part you're missing is a webserver...
Xitami's good for win95/98 (see www.imatix.com), though I
haven't used it for a couple of years, so I don't know if
it's as good as it used to be (chances are, it is ;))...
also, a lot of people prefer Apache for windows... unless
you know or are trying to learn Apache, I'd recommend that
you stick with a windows-based server. From what I remember,
Xitami was plenty of server for experimenting purposes ;)

--Toby






Hey Guys,

I am developing an application in PHP.  I make use of an include file that
contains regularly used functions.  As I am working I am taking more and
more of the code out and putting it into functions straight into the include
file.  This file is included on almost every page and I am worried that it
is going to slow the pages down.  Will it have a large effect on the pages
speed.  It's only about 400 lines at the moment but getting bigger the way I
am working

Is it likely to slow the pages much even if only some of the functions are
called from particular pages.

Thanks,
Abe





> As I am working I am taking more and more of the code out and 
> putting it into functions straight into the include file. This 
> file is included on almost every page and I am worried that it
> is going to slow the pages down.  Will it have a large effect 
> on the pages speed.  It's only about 400 lines at the moment 
> but getting bigger the way I am working
> 
> Is it likely to slow the pages much even if only some of the 
> functions are called from particular pages.

I wouldn't worry about it too much. www.inww.com has about 200k 
of included files containing functions etc in each page and it's 
performing nicely. Depending on the server, the included files 
should end up cached anyway.

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the comfy chair!




I don't think so, I have bunch of include files, which have more than 5000 lines
and is running very fine.

Abe wrote:

> Hey Guys,
>
> I am developing an application in PHP.  I make use of an include file that
> contains regularly used functions.  As I am working I am taking more and
> more of the code out and putting it into functions straight into the include
> file.  This file is included on almost every page and I am worried that it
> is going to slow the pages down.  Will it have a large effect on the pages
> speed.  It's only about 400 lines at the moment but getting bigger the way I
> am working
>
> Is it likely to slow the pages much even if only some of the functions are
> called from particular pages.
>
> Thanks,
> Abe
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





Thanks - nice looking site.

Abe

----- Original Message ----- 
From: "Jason Murray" <[EMAIL PROTECTED]>
To: "'Abe'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 10:17 PM
Subject: RE: [PHP] BIG include file !!!


> > As I am working I am taking more and more of the code out and 
> > putting it into functions straight into the include file. This 
> > file is included on almost every page and I am worried that it
> > is going to slow the pages down.  Will it have a large effect 
> > on the pages speed.  It's only about 400 lines at the moment 
> > but getting bigger the way I am working
> > 
> > Is it likely to slow the pages much even if only some of the 
> > functions are called from particular pages.
> 
> I wouldn't worry about it too much. www.inww.com has about 200k 
> of included files containing functions etc in each page and it's 
> performing nicely. Depending on the server, the included files 
> should end up cached anyway.
> 
> Jason
> 
> -- 
> Jason Murray
> [EMAIL PROTECTED]
> Web Design Team, Melbourne IT
> Fetch the comfy chair!
> 





When I use random rand(1, 10) I always get 2?

Thank you,

--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com
-------------------------------------------- 




you have generate a unique seed to generate random number srand, please read

http://www.php.net/manual/function.rand.php

has more info

Brandon Orther wrote:

> When I use random rand(1, 10) I always get 2?
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.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]





Did you seed your random number generator?

ie: srand ((double) microtime() * 1000000);

- James

> -----Original Message-----
> From: Brandon Orther [mailto:[EMAIL PROTECTED]]
> Sent: January 10, 2000 2:24 PM
> To: PHP User Group
> Subject: [PHP] rand is not random for me :(
> 
> 
> When I use random rand(1, 10) I always get 2?
> 
> Thank you,
> 
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> -------------------------------------------- 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




I posted this to the phpMyAdmin support forum and emailed Tobias
Ratschiller, but have heard no response. I am posting to this forum to try
and resolve this problem.

I had phpMyAdmin running successfully on my server. I then upgraded to PHP
4.0.4, and phpMyAdmin appears to have broken. The error messages I receive
are as follows:

Warning: Variable passed to reset() is not an array or object in
/path/to/phpMyAdmin/lib.inc.php on line 102

Warning: Variable passed to each() is not an array or object in
/path/to/phpMyAdmin/lib.inc.php on line 103

The variable is $cfgServers, which is set in config.inc.php. There is
probably something that was disabled in PHP 4.0.4, or else a new syntax,
that broke this script.
The syntax in config.inc.php looks like this:

$cfgServers[1]['host'] = 'localhost;           // MySQL hostname
$cfgServers[1]['port'] = '';                    // MySQL port - leave blank
for default port
$cfgServers[1]['adv_auth'] = 'true';             // Use advanced
authentication?
$cfgServers[1]['stduser'] = 'root';             // MySQL standard user (only
needed with advanced auth)
$cfgServers[1]['stdpass'] = 'password';                 // MySQL standard
password (only needed with advanced auth)
$cfgServers[1]['user'] = 'root';                // MySQL user (only needed
with basic auth)
$cfgServers[1]['password'] = '';                // MySQL password (only
needed with basic auth)
$cfgServers[1]['only_db'] = '';                 // If set to a db-name, only
this db is accessible
$cfgServers[1]['verbose'] = '';

Any help would be greatly appreciated.

Erica Douglass
Server Appliance Business Unit
Sun Microsystems (Cobalt Networks)






Clarification: A quotation mark got left out after ['host'] = 'localhost in
my original email. It is in the config.inc.php file and makes no difference
in the error messages. The fix is below.

Erica

""Erica Douglass"" <[EMAIL PROTECTED]> wrote in message
93indu$enk$[EMAIL PROTECTED]">news:93indu$enk$[EMAIL PROTECTED]...
> I posted this to the phpMyAdmin support forum and emailed Tobias
> Ratschiller, but have heard no response. I am posting to this forum to try
> and resolve this problem.
>
> I had phpMyAdmin running successfully on my server. I then upgraded to PHP
> 4.0.4, and phpMyAdmin appears to have broken. The error messages I receive
> are as follows:
>
> Warning: Variable passed to reset() is not an array or object in
> /path/to/phpMyAdmin/lib.inc.php on line 102
>
> Warning: Variable passed to each() is not an array or object in
> /path/to/phpMyAdmin/lib.inc.php on line 103
>
> The variable is $cfgServers, which is set in config.inc.php. There is
> probably something that was disabled in PHP 4.0.4, or else a new syntax,
> that broke this script.
> The syntax in config.inc.php looks like this:
>
> $cfgServers[1]['host'] = 'localhost';           // MySQL hostname
> $cfgServers[1]['port'] = '';                    // MySQL port - leave
blank
> for default port
> $cfgServers[1]['adv_auth'] = 'true';             // Use advanced
> authentication?
> $cfgServers[1]['stduser'] = 'root';             // MySQL standard user
(only
> needed with advanced auth)
> $cfgServers[1]['stdpass'] = 'password';                 // MySQL standard
> password (only needed with advanced auth)
> $cfgServers[1]['user'] = 'root';                // MySQL user (only needed
> with basic auth)
> $cfgServers[1]['password'] = '';                // MySQL password (only
> needed with basic auth)
> $cfgServers[1]['only_db'] = '';                 // If set to a db-name,
only
> this db is accessible
> $cfgServers[1]['verbose'] = '';
>
> Any help would be greatly appreciated.
>
> Erica Douglass
> Server Appliance Business Unit
> Sun Microsystems (Cobalt Networks)
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Howdy.

I have a SuSE 7.0 Linux install with apache and mod_php4. I can 
do .php files all day long, but I have a shopping cart thingie that is 
written for php3, and none of the files will parse. I have tested my 
machine with a phpinfo() php3 file, and no go on that either.

I figure that something is misconfigured, but where might I look? I 
went through the php.ini file, and found nothing of note.

Thanks :)


Joey Kelly
System & Network Administrator
ActionBusinessSystems.com

&&
Gimme this! Gimme that!
Hurry up or I'll knock you flat!




On Wed, 10 Jan 2001 [EMAIL PROTECTED] wrote:

> Howdy.
>
> I have a SuSE 7.0 Linux install with apache and mod_php4. I can
> do .php files all day long, but I have a shopping cart thingie that is
> written for php3, and none of the files will parse. I have tested my
> machine with a phpinfo() php3 file, and no go on that either.
>
> I figure that something is misconfigured, but where might I look? I
> went through the php.ini file, and found nothing of note.
>
> Thanks :)
>
>
> Joey Kelly
> System & Network Administrator
> ActionBusinessSystems.com
>

The problem's not in the php.ini file; it's in httpd.conf, srm.conf or
access.conf (not sure which one under SuSE). There should be a line that reads
"AddType application/x-httpd-php .php" or something to that effect. Add
" .php3" to the end of that line then restart Apache.

-- 
Ignacio Vazquez-Abrams  <[EMAIL PROTECTED]>






[EMAIL PROTECTED] wrote:
> I have a SuSE 7.0 Linux install with apache and mod_php4. I can
> do .php files all day long, but I have a shopping cart thingie that
> is written for php3, and none of the files will parse. I have tested
> my machine with a phpinfo() php3 file, and no go on that either.
>
> I figure that something is misconfigured, but where might I look? I
> went through the php.ini file, and found nothing of note.

Look in /etc/httpd/httpd.conf (the usual place on a SuSE-Server).
Search for a line like
AddType application/x-httpd-php .php

Add .php3 and it should work.

regards
Wagner

-- 
Sanity is calming, but madness is more interesting.




Hi!


  Make sure that your httpd.conf file include 

        AddType application/x-httpd-php .php .php3

regards
hope it helps
Marcelo Gulin


[EMAIL PROTECTED] escribió:
> 
> Howdy.
> 
> I have a SuSE 7.0 Linux install with apache and mod_php4. I can
> do .php files all day long, but I have a shopping cart thingie that is
> written for php3, and none of the files will parse. I have tested my
> machine with a phpinfo() php3 file, and no go on that either.
> 
> I figure that something is misconfigured, but where might I look? I
> went through the php.ini file, and found nothing of note.
> 
> Thanks :)
> 
> Joey Kelly
> System & Network Administrator
> ActionBusinessSystems.com
> 
> &&
> Gimme this! Gimme that!
> Hurry up or I'll knock you flat!
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]





list
i am having a problem with pages that use includes.
i am requiring the page like this

require("./comment.php");

problem is, as soon as i view the page, only the tags 
<html><head></head></html>
show up!!
what could this be?
i have no trouble if i comment out the pages...
the pages are running on debain 2.2, php4, and use some mysql stuff.

please help!! 






Hello James, 

(JM == "James Mclean") [EMAIL PROTECTED] writes:

JM> i am having a problem with pages that use includes.

What is the extension of the document that you're placing include()
in?

JM> i am requiring the page like this

JM> require("./comment.php");

So us what is in comment.php

JM> problem is, as soon as i view the page, only the tags
JM> <html><head></head></html> show up!! what could this be? i have no
JM> trouble if i comment out the pages... the pages are running on
JM> debain 2.2, php4, and use some mysql stuff.

JM> please help!! 

-Brian
--
Most people find the concept of programming
obvious, but the doing impossible. 







(BC == "Brian Clark") [EMAIL PROTECTED] writes:

BC> So us what is in comment.php
    ^^
    Show
    
-Brian
--
There are two ways to write error-free programs,
and only the third one works.






hi,
I know it's slightly off topic but i hope you;ll forgive me.
i'm testing interbase because someone on this list mentioned it would be  a 
good offline database.

Interbase ('firebird') wants to connect to the local server (i'm running 
WAMP - Windows, Apache, MySQL, PHP), and interbase needs a username.

But its all local, not connected. So what should i tell interbase??

Chris

PS i AM currently downloading the manual but that will take another hour (10 
MB, bad line, was interrupted several times )



--------------------------------------------------------------------
--  C.Hayes  Droevendaal 35  6708 PB Wageningen  the Netherlands  --
--------------------------------------------------------------------

 





Hello Maximiliano, 

(MB == "Maximiliano Bubenick") [EMAIL PROTECTED] writes:

MB> I run linux red hat 6.2 with apache 1.3.12, php4 and mysql 3.22.32

MB> The first time my problem was Call to undefined function:
MB> mysql_connect(), and I add the line dl("mysql.so"); and then bring
MB> me:

Why put yourself through that abuse? :-)

Just build PHP with MySQL support.

./configure --with-mysql [other options here]

<snip>

MB> Thanks
MB> Max

-Brian
--
The trouble with a lot of self-made men
is that they worship their creator.






Brian Clark ...
>
> Hello Alexander,
>
> (AW == "Alexander Wagner") [EMAIL PROTECTED] writes:
>
> >> Mmmmppppfff... ultraedit's wordlist file still lacks the color of
> >> allaire's homesite - it does detect which parts of the .php file
> >> are HTML and what parts of the file are PHP code, and colours
> >> syntax very well...
>
> AW> Who needs that? Nesting PHP in HTML is bad style, IMHO.
>
> Bad style?!
>
> You _actually_ print() or echo() everything you want to send to the
> browser?
>
> If it doesn't need to be interpolated by PHP, why print() it?

Well, sometimes (IMHO), the better way to keep things readable is to include() things, 
such as include "page_header.php"  , include
"lateral_links.php" , include "page_footer.php" , and so on...

Damn, my pages look so professional including everything... the final client-side html 
page is huge but the main PHP is so simple
and structured...

And, what i was going to say, if you wanna mix HTML and PHP code, perhaps the way you 
want is to include(), print() and echo() all
the HTML and let everything in PHP code...

Of course, i'm meaning of including() HTML files (without any PHP code).





Reply via email to