[PHP] Any netscape users out there?

2002-09-03 Thread Dan Ostrowski

I develop mostly in a Linux environment anymore, but I have a problem with Netscape 
and PHP.  Well, not so much with PHP but developing it with Netscape.

Post data makes Netscape REFUSE to show the underlying source code!  It's virtually 
impossible to design form handling stuff when I can't see the code that's generated 
when i send post data.  Is this a bug and how do you fix it??

regards,
dan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Any netscape users out there?

2002-09-03 Thread Dan Ostrowski

It happens ANYWHERE there is post info for me. Not just on my own PHP
development pages.  I was just wondering if there was a setting on
Netscape to fix this kind of thing.

regards,
dan


On Tue, 03 Sep 2002 10:07:11 -0600
"Ashley M. Kirchner" <[EMAIL PROTECTED]> wrote:

> Dan Ostrowski wrote:
> 
> > Post data makes Netscape REFUSE to show the underlying source code! 
It's virtually impossible to design form handling stuff when I can't see
the code that's generated when i send post data.  Is this a bug and how do
you fix it??
> 
> i've never seen this problem in ns, at least not with the stuff i've
designed in the past.  do you have a page/form somewhere we could look at?
> 
> --
> W | I haven't lost my mind; it's backed up on tape somewhere.
>   +
>   Ashley M. Kirchner <mailto:[EMAIL PROTECTED]>   .   303.442.6410 x130
>   IT Director / SysAdmin / WebSmith . 800.441.3873 x130
>   Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6
>   http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Any netscape users out there?

2002-09-03 Thread Dan Ostrowski

Which is strange because I use Netscape 6. Hmm... Perhaps I should upgrade to 7.

Also, would the fact that I have Netscape 4.x installed on the same machine as my 
Netscape 6 cause anything funny to "bleed" over, you think? Perhaps its a shared 
library thing..

hmmm...

Well thanks for the advice...

regards,
dan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Any netscape users out there?

2002-09-03 Thread Dan Ostrowski

hmmm... must be a bug. Same thing happens on Mozilla as Netscape.  Anything with post 
data greys out the view source button, and I can't get it open.

Weird. Time to hit some Linux IRC rooms.

dan

On Tue, 03 Sep 2002 12:56:02 -0400
Robert Cummings <[EMAIL PROTECTED]> wrote:

> Dan Ostrowski wrote:
> > 
> > Windows?  No, Xwindows... :)  I hate M$ stuff. I am on linux.
> 
> I hear ya brother :)
> 
> > 
> > Hmmm.. maybe I will just use Mozilla for the time being then.
> > 
> > regards,
> > dan
> > 
> > On Tue, 03 Sep 2002 12:50:42 -0400
> > Robert Cummings <[EMAIL PROTECTED]> wrote:
> > 
> > > Shouldn't be any bleeding from shared libraries. but then I'm on Linux
> > > and your probably under windows, and so I don't know for sure anymore :)
> > >
> > > Cheers,
> > > Rob.
> > >
> > > Dan Ostrowski wrote:
> > > >
> > > > Which is strange because I use Netscape 6. Hmm... Perhaps I should upgrade to 
>7.
> > > >
> > > > Also, would the fact that I have Netscape 4.x installed on the same machine as 
>my Netscape 6 cause anything funny to "bleed" over, you think? Perhaps its a shared 
>library thing..
> > > >
> > > > hmmm...
> > > >
> > > > Well thanks for the advice...
> > > >
> > > > regards,
> > > > dan
> -- 
> .-.
> | Robert Cummings |
> :-`.
> | Webdeployer - Chief PHP and Java Programmer  |
> :--:
> | Mail  : mailto:[EMAIL PROTECTED] |
> | Phone : (613) 731-4046 x.109 |
> :--:
> | Website : http://www.webmotion.com   |
> | Fax : (613) 260-9545 |
> `--'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Please help with fresh fish.

2002-09-03 Thread Dan Ostrowski

I truely recommend "Beginning PHP4" by Wrox Press (www.wrox.com or p2p.wrox.com) if 
you have no experience in programming or PHP.  It is, by far, the best $40 you will 
ever ever spend. I promise.

regards,
dan

On Tue, 3 Sep 2002 16:46:03 -0700 (PDT)
Philip Hallstrom <[EMAIL PROTECTED]> wrote:

> Read everything at the following sites :-)
> 
> www.php.net
> www.zend.com
> www.phpbuilder.com
> 
> In particular read the manuals, tips, tricks, examples, and links to other
> sites sections.
> 
> Lots of good info there and will point to more sites.
> 
> On Tue, 3 Sep 2002, Anh wrote:
> 
> > Hello everyone,
> >
> > I would like to study PHP but do not have any experience about PHP or
> > programming. Could you please give me some advice to begin such as books,
> > news, forum...
> >
> > Many thanks in advance,
> > Anh
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Object composition and reference

2002-09-06 Thread Dan Ostrowski

Well this is just a suggestion since I am in the middle of some PostgreSQL
learning and I don't entirely know your situation.. BUT...

In times like this, I usually build one MASTER OBJECT to controll all the
other little happy citizen objects like mindless sheep.

For instance.  At one point I needed Form objects ( think of your bus ) to
not only have access to other objects called Style objects, which could
change ( think of your diesel object ), but also communicate to a database
and do all sorts of other fun stuff. Now.. I couldn't have random objects
floating around in orbit cause then they couldn't talk to each other so
well, and things would get frustrating and one of the objects was likely
to punch one of the other objects, knocking out his front properties.  I
couldn't afford the dental.

So what I did was create a "FormMaster" which held methods for accessing
individual objects, makeing all the objects do the same thing ( whether
they complained or not ), letting the objects access (indirectly) the
properties ( think 'global, but not' ) of the master object, and it all
stays very neat.

of course.. it's more coding... hehe.. but it made my forms behave quite
nicely.

regards,
dan



 Fri, 6 Sep 2002 17:45:33 -0500
Paul Smith <[EMAIL PROTECTED]> wrote:

> Other classes need to have access to these objects without going 
> through any mode objects. I suppose I can just pass by reference to 
> these other classes; I don't want to have any objects out of sync.
> 
> On Friday, September 6, 2002, at 06:12  PM, Dan Ostrowski wrote:
> 
> > The only point I don't understand is why you are averted to saying
> > $bus->setFuel($diesel); I don't understand the drawback...
> >
> > regards,
> > dan
> >
> >
> > On Fri, 6 Sep 2002 16:58:06 -0500
> > Paul Smith <[EMAIL PROTECTED]> wrote:
> >
> >> I'm compositing a class based on other classes. The component classes
> >> are (this is for a transportation application) fuel and vehicle. The
> >> container class is mode (as in mode of transit: rail, bus, etc.). 
> >> There
> >> can be several vehicles and fuels for each mode (many to one). I want
> >> to be able to accomplish something like this:
> >>
> >> $bus = new mode();
> >> $diesel = new fuel($bus);
> >> $ethanol = new fuel($bus);
> >> $class_a_bus = new vehicle($bus);
> >> $articulated_bus = new vehicle($bus);
> >>
> >> In other words, register the fuels and vehicles with the mode object 
> >> in
> >> such a way that I don't have to make them members of said object; in
> >> further other words, instead of doing it something like:
> >>
> >> $bus = new mode();
> >> $diesel = new fuel();
> >> $bus->addFuel($diesel);
> >>
> >> Is there a way I can then reference the components of the mode object
> >> without having to know the names I picked for the variables; without
> >> having to do something like:
> >>
> >> $diesel = new fuel();
> >> $bus->addFuel($diesel, 'diesel'); <-- a handle to reference the
> >> globally scoped variable
> >>
> >> One kludgy way would be to foreach() the $GLOBALS in a method of the
> >> mode class, checking for is_a('fuel'). One of my rules of thumb is to
> >> reduce use of the $GLOBALS. Would a more elegant solution be related 
> >> to
> >> PHP's reference counting? I apologize if this is a confusing-as-hell
> >> post. I would be more than happy to clarify a point...
> >>
> >> Paul
> >>
> >> --
> >> Paul Smith <[EMAIL PROTECTED]>
> >> Center for Neighborhood Technology
> >> Chicago, IL USA
> >>
> >>
> >> -- 
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> --
> Paul Smith <[EMAIL PROTECTED]>
> Center for Neighborhood Technology
> Chicago, IL USA

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Extracting Numbers from a string.

2002-09-11 Thread Dan Ostrowski

A simple:

eregi_replace("[^0-9]", "", $myvar);

should do it. it says.. replace everything that is not a number ( character class 
"[^0-9]" which means Character class "["  NOT "^" of Decimal "0-9" end character class 
"]" ) with a NULL string, thereby ripping out all non-numeric components and leaving 
you with a totally numeric string. ( in theory ).

I haven't tested the code so you may have to play with it, but it's pretty simple.

dan


On Wed, 11 Sep 2002 15:31:22 -0700
"Jason Caldwell" <[EMAIL PROTECTED]> wrote:

> I need to extract the numbers only from a field.
> 
> For example:  I have an AMOUNT field and so that I can filter out any user
> typo's I would like to extract the numbers only.
> 
> If the user enters $56.55 for example or just $56 then I would like to be
> able to remove the "$" and the "." keeping just the 56 or 5655.
> 
> Can I use eregi_replace() to do this -- I've been trying but it doesn't seem
> to work right.
> 
> Thanks.
> Jason
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Installation

2002-09-18 Thread Dan Ostrowski

Well first off... the normal sequence of events goes as thus:

./configure 

./make

./make install


So you are missing a step in there.  Secondarily, a "make clean" will only
go through and tidy up bits of code that need cleaning AFTER an install.
It will not "uninstall and clear space" as it were, so you have probably
not really put yourself in a position to start all over.  However, I am
not sure how easily that can be helped.

The biggest thing about installing ANY software from source is making sure
you run ./configure --help first.  That will show you, in tedious manpage
form, what kind of options are available.

The big thing, when I installed PHP on my machine, was simply to have
apache installed and able to run first before attempting to hook up PHP. Also
i had to dig through ./configure --help because I needed to use PostgreSQL
so i needed to do something like ./configure --enable-pgsql to get things
to run right.

I am by no means an expert on this sort of thing, so perhaps another linux user could 
help? I didn't really use a "configuration script" to install my PHP, but a lot of 
people do, so perhaps they could share?

regards,
dan





On Wed, 18 Sep 2002 21:14:04 +0200
"Sascha Braun" <[EMAIL PROTECTED]> wrote:

> Right now I've made a make clean to start it all over.
> 
> Would you like to help me a little?
> 
> Thanks
> 
> Sascha
> 
> - Original Message -
> From: "Dan Ostrowski" <[EMAIL PROTECTED]>
> To: "Sascha Braun" <[EMAIL PROTECTED]>
> Sent: Wednesday, September 18, 2002 10:12 PM
> Subject: Re: [PHP] Installation
> 
> 
> > I would really never recommend using an RPM to install any server
> components really.  It ends up being more problomatic than it's worth,
and
> the little bit of extra work nessesary for source installs are usually
worth
> it in know how and performance.
> >
> > my 2 cents.
> >
> > dan
> >
> > On Wed, 18 Sep 2002 20:47:45 +0200
> > "Sascha Braun" <[EMAIL PROTECTED]> wrote:
> >
> > > All these installation docs are just driving me crazy.
> > >
> > > How am I installing PHP 4 any version on my RedHat 7.3 Server.
> > >
> > > Isn't it done by an RPM easily?
> > >
> > > Bye
> > >
> > > Sascha
> > >
> >

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] DB speed

2002-10-10 Thread Dan Ostrowski

For SIMPLE SIMPLE selects and inserts, MySQL will probably remain 
faster.  If you are doing a very simple web set up where you are mostly 
inserting and spitting out single table information, MySQL will be the 
way to go.

Anything else, I would recommend PostgreSQL. It's got FAR superior 
features and anytime you start very complex queries ( like JOINS and 
multi-table aggregate functions, etc ) postgres will blow MySQL out of 
the water.

They are both nice, just for different purposes. MySQL = simple, 
PostgreSQL = anything else.

Also, you can run "EXPLAIN " on PostgreSQL to find out exactly 
what is happening when you do a query and if it's using an index 
properly or not.


regards,
dan


tuxen wrote:

>I think i read something a while ago, about mysql being faster, having
>less features, but postgres being a little slower but able to handle
>LARGE databases better than mysql. I could be wrong, so dont take my
>word for it. At the end of the day they are both good db's.
>
>On Thu, 2002-10-10 at 09:02, Simon Taylor wrote:
>  
>
>>Well obviously - cos MySQL rocks!!, but seriously I also did some tests and
>>got variable results from different db's - even got an odbc connection to
>>access to run faster than mysql at one stage!! - something tells me there
>>are other factors contributing..
>>Cheers
>>Simon
>>
>>-Original Message-
>>From: Uros Gruber [mailto:[EMAIL PROTECTED]] 
>>Sent: 10 October 2002 14:17
>>To: [EMAIL PROTECTED]
>>Subject: [PHP] DB speed
>>
>>
>>Hi!
>>
>> I'm making some testing over DB.php  (PEAR)
>>
>> And i wan't to know if this is normal.
>>
>> I've made some script where I connect do SQL server
>> and execute one simple (1row) query.
>>
>> I use pgsql and mysql. tables and indexes are same for both  servers. So
>>test table is identical
>>
>> Whe i execute those script i get some timing results
>>
>>PGSQL
>>Total time: 0.0576
>>Execution time: 0.0185
>>
>>MySQL
>>Total time: 0.0086
>>Execution time: 0.0028 
>>
>>Time is in seconds.
>>
>>My machine is PIII 333 MHz with 128MB RAM. I table is only 3 rows of data.
>>
>>I want to know why is sucsh diference. Both servers runing
>>with socket connections and using connnect (non-persistant)
>>
>>-- 
>>tia,
>> Uros  mailto:[EMAIL PROTECTED]
>>
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>-- 
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
>>
>>
>
>
>
>
>  
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] DB speed

2002-10-10 Thread Dan Ostrowski

Yes persistant connections to pg make a LOT of difference and are 
recommended.. I have never had overhead problems using them eaither. I 
am terribly sorry i didn't mention this before.

Just make sure you have proper indexes and you should be good to go.

regards,
dan



Uros Gruber wrote:

>Hi!
>
>I make some more test for this.
>
>When i enable pconect (persistant) the result amazed me.
>
>PGSQL
>Total time: 0.0070
>Execution time: 0.0034
>MySQL
>Total time: 0.0072
>Execution time: 0.0027
>
>Now PGSQL is as fast as mysql or maybe a lile slower.
>So is this normal that non-persistant is so much overhead for
>pg. Is there any tools to check this. Or is some kind of a
>bug in php. I use 4.2.3. And pg is 7.2.1. Can somebody make
>some test. I can send script what i've run.
>
>
>  
>




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php