[PHP] Browser cache and form with $PHP_SELF

2001-01-09 Thread Egan

Using $PHP_SELF, I have a form that calls itself until the user gets
all the input right.  Each time the user corrects some field and
resubmits, the browser builds a cache of pages, as you can see with
the browser back button.

Is there a way to make the browser clear the cache on every submission
so the user cannot go back to any previous page?  Seems like I've seen
sites that do this, but I'm not sure how they do it.


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]




Re: [PHP] Browser cache and form with $PHP_SELF

2001-01-09 Thread Egan

On Wed, 10 Jan 2001 12:13:26 +0530, "Hrishi" <[EMAIL PROTECTED]>
wrote:

>try adding a header("Expires: 0"); line at the top of the script. this will
>provide an 'already expired' page to the user. i.e., the browser will not
>store the page in cache at all.
>other headers are:
>
>Cache-Control: max-age=0
>Cache-Control: no-cache
>
>these will make sure any proxies/ISP caches will also not store the page.

Sounds like just what I need.  Many Thanks!

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]




Re: [PHP] looking for a PHP editor

2001-01-10 Thread Egan

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

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]




Re: [PHP] looking for a PHP editor

2001-01-10 Thread Egan

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



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




Re: [PHP] looking for a PHP editor

2001-01-10 Thread Egan

On Wed, 10 Jan 2001 17:54:07 + (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



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




Re: [PHP] Browser cache and form with $PHP_SELF

2001-01-11 Thread Egan

On Wed, 10 Jan 2001 12:13:26 +0530, "Hrishi" <[EMAIL PROTECTED]>
wrote:

>Cache-Control: no-cache
>
>will make sure any proxies/ISP caches will also not store the page.

Yes this works.  I can see that IE5 does not cache the page locally,
by looking in Temporary Internet Files.

I realize now though, that what I really need is to drop certain pages
out of the browser "back" chain.

For instance say I have three pages:

   A -->  B  -->  C


Once the user selects page C, I don't want them to see page B with the
browser back button.  If they use the back button, I want them to jump
from C all the way back to A.

IOW, I want to "unlink" B from the chain. Is that possible?

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]




Re: [PHP] mail() question

2001-01-15 Thread Egan


>> Thanks, but as stated in my post, all of my headers
>> Return-Path included, are coming through correctly.


>From the sendmail bat book:


> The Return-Path: header is intended to show the envelope address of
> the real sender ... it is intended to be used solely for notification
> of delivery errors.
>
> There must be only one Return-Path: header in any mail message, and
> should be placed there by the site performing final delivery.
>
>   ^^
 


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




Re: [PHP] mail() question

2001-01-15 Thread Egan

On Mon, 15 Jan 2001 16:05:22 -0500, Egan <[EMAIL PROTECTED]> wrote:

>
>>> Thanks, but as stated in my post, all of my headers
>>> Return-Path included, are coming through correctly.
>
>
>>From the sendmail bat book:
>
>
>> The Return-Path: header is intended to show the envelope address of
>> the real sender ... it is intended to be used solely for notification
>> of delivery errors.
>>
>> There must be only one Return-Path: header in any mail message, and
>> should be placed there by the site performing final delivery.
>>
>>   ^^


If the real sender is "nobody" then just make an alias in your aliases
file to point "nobody" to somebody. :-)





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




Re: [PHP] mail() question

2001-01-15 Thread Egan

On Mon, 15 Jan 2001 16:08:18 -0500 (EST), Robert Hough
<[EMAIL PROTECTED]> wrote:

>Well, after checking the headers myself, it doesn't look like sendmail is
>accepting my return-path, or php isn't sending it. Headers below:
>
>Received: (from nobody@localhost)
>by trinity.solveinteractive.com (8.11.1/8.11.1) id f0FKhQQ84040;
>Mon, 15 Jan 2001 15:43:26 -0500 (EST)
>(envelope-from nobody)

>>>   

Right.

Notice the keyword "envelope" above, and see "Return-Path:" in the bat
book.  The site performing final delivery controls Return-Path:





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




Re: [PHP] mail() question

2001-01-15 Thread Egan

On Mon, 15 Jan 2001 13:16:23 -0800 (PST), jeremy brand
<[EMAIL PROTECTED]> wrote:

>I think that you answered your own question.  I know that PHP sends
>Return-Path: headers, I do it all the time.

Then stop it!  :-)

See the sendmail bat book, even if using qmail:

>>> There must be only one Return-Path: header in any mail message, and
>>> should be placed there by the site performing final delivery.
>>>
>>>   ^^

The site performing final delivery looks at the envelope address to
determine "Return-Path: thus making it useless to send these headers
yourself.




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




Re: [PHP] Netscape differences?

2001-01-15 Thread Egan

On Mon, 15 Jan 2001 21:05:08 -0600, "Richard Lynch" <[EMAIL PROTECTED]>
wrote:

>Try sending the various "no-cache" and "expiration" headers.  You can find
>more details in code archive samples linked from:
>
>http://php.net/links.php


I see many links there, but I don't know which one is

  "code archive samples"

Anybody?



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




Re: [PHP] phpwebhosting.com

2001-01-17 Thread Egan

I was curious so I looked at their site.

They shout "unlimited" as loud as they can, for every service you can
imagine.  But their FAQ says:

> Though we do not have any pre-set limits, you will not be allowed
> to and/or over five GB of bandwidth/month.


"Yes there is NO limit. Read our lips. There is really NO limit.  But
even though there is NO limit, you still can't have more than 5GB per
month for our competition killing price of $9.95"

"Anyone should be able to understand that, right?"

They also claim they will limit each server to a max of 125 users.  So
let's do a little math ...

125 users at $10 per month, is a maximum revenue of $1,250 per month
per server.  From that meager revenue, they are able to provide their
customers with an OC-12.  I would like to meet the genius who is able
to pull that financial rabbit out of a hat!


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]




Re: [PHP] phpwebhosting.com

2001-01-17 Thread Egan

On Wed, 17 Jan 2001 16:46:45 -0500, Egan <[EMAIL PROTECTED]> wrote:

>"Yes there is NO limit. Read our lips. There is really NO limit.  But
>even though there is NO limit, you still can't have more than 5GB per
>month for our competition killing price of $9.95"


And that reminds me of a joke ...


A man sees a restaurant and the sign says:

   "All you can eat for $7.95"

He is very hungry, so he goes in and pays his money.  Then he gets his
first plate of food, and eats it quickly.  When he goes to get his
second plate, the manager comes over and asks him to leave.

The man says "What?  The sign says all you can eat."

The manager replies "That *IS* all you can eat for $7.95!"



:-)




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




Re: [PHP] phpwebhosting.com

2001-01-17 Thread Egan

On Wed, 17 Jan 2001 18:04:16 -0500, "Toby Butzon"
<[EMAIL PROTECTED]> wrote:

>> 125 users at $10 per month, is a maximum revenue of $1,250 per month
>> per server.  From that meager revenue, they are able to provide their
>> customers with an OC-12.  I would like to meet the genius who is able
>> to pull that financial rabbit out of a hat!
>
>...and one machine is chewing up a whole OC-12?
>
>Who says they don't have multiple machines on the same OC-12?

I didn't.

But even if they had 100 servers, have you priced an OC-12 lately?
And if they actually have a server farm large enough to justify an
OC-12, then how many people would be required to maintain a server
farm that large?  What about the cost of those salaries?  What about
the cost of the co-location space.  What about the cost of ... etc,
etc?

When you add up all the costs, and compare that to the maximum revenue
they could possibly generate with a price of $9.95 per month, I am not
convinced they put much value on truth in advertising.  

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]




Re: [PHP] phpwebhosting.com

2001-01-17 Thread Egan

On Wed, 17 Jan 2001 18:24:28 -0500, "Leonard T. Harris"
<[EMAIL PROTECTED]> wrote:

> But even if they had 100 servers, have you priced an OC-12 lately?
>
>No I haven't.  Can you enlighten me?

We're on an OC-12 too.  But we don't imply that we have it all to
ourselves.  Very few hosting providers, if any, do.

Offering value to customers means provisioning bandwidth which meets
your current and short term expected load.  As long as that condition
is met, advertising OC-whatever is just a marketing gimmick.

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]




Re: [PHP] phpwebhosting.com

2001-01-17 Thread Egan

On Thu, 18 Jan 2001 10:50:24 +1100, Jason Murray
<[EMAIL PROTECTED]> wrote:

>> But even if they had 100 servers, have you priced an OC-12 lately?
>
>Actually, isn't it possible / more likely that they're running one 
>server cohosted at an ISP with an OC-12 link?

Yes.

But the few ISPs who actually have OC-12 links charge accordingly for
their co-location service.  They are not the cheapest you will find.


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]




Re: [PHP] phpwebhosting.com

2001-01-17 Thread Egan

On Wed, 17 Jan 2001 16:13:26 -0800, Ken <[EMAIL PROTECTED]>
wrote:

>http://gometanet.com/connect/fiber.htm
>
>OC12
>622 Mb
>
>Monthly Fee
>$550,000
>
>Setup Fee
>call   (prolly between 10k and 20k)


And if you walk in off the street and place an order, expect a much
larger deposit than 10k or 20k, to cover your first month's service
charge. :-)


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]




Re: [PHP] Ethics question...

2001-01-17 Thread Egan

On Wed, 17 Jan 2001 20:59:41 -0600, "Scott Gerhardt"
<[EMAIL PROTECTED]> wrote:

>If your client paid you to develop the E-Commerce system  they would
>typically own all rights to it unless otherwise agreed upon.

I don't know what country you are speaking of, but in the U.S., that
view is a commonly held misconception.

Under U.S. copyright law, if the author is an independent contractor,
in the absence of a written agreement covering the work, the author
owns all copyrights to the work, with the exception that the client
who paid for the work is automatically granted a license to their one
copy (and only their one copy).  The client does *not* have copy
_rights_ which permit them to resell it, or even give it away, unless
the author specifically gave them those rights in writing, such as a
work for hire agreement.

If the author was working as an employee, OTOH, then the situation is
reversed, and the employer owns the copyrights by default.

As for the license of PHP itself, vs. an author's license to any code
he writes in the language known as PHP:

Writing application code in the PHP language does not make the code
you wrote automatically become open source,  Yes, the PHP processor is
open source, but its copyright is entirely separate and distinct from
any application system which may be written in the PHP language.

I if write a C program, it does not matter whether I compile it with
GCC which is GPLed, or with some proprietary C compiler.  Either one
is irrelevant for determining ownership of the copyrights which apply
to the code I wrote in the C language.

You cannot copyright ideas, and the PHP language is only an idea.

The PHP Apache module or other PHP processor is an *expression* of
ideas embodied in the PHP language.  And only its expression can be
copyrighted, not the idea itself.

Suppose RWS said you have to stop writing proprietary C programs, just
because someone might compile it with GCC?

I hope you would laugh. :-)


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]




Re: [PHP] Ethics question...

2001-01-17 Thread Egan

On Thu, 18 Jan 2001 01:56:18 -0500, Les Neste
<[EMAIL PROTECTED]> wrote:

>What Egan wrote is very true.  I speak with some knowledge -- having
>weathered a copyright violation suit based on the action of one of my
>employees -- and if you write it (as anything other than an employee) then
>you own it, 'it' being the source code and the program compiled from that
>source code.
>
>Egan, you mentioned something new to me: that you as author own it except
>for 'that one client who paid for it'.  Can you offer some citation to back
>this up?

It's no different from buying a book at the bookstore.  The one copy
you pay for is yours to use.  However, that doesn't mean you also have
the right to take it down to a friendly neighborhood printer and have
them print up a few dozen extra copies for you.

It's mostly common sense.  The client does not get "copyrights" to
make additional copies, but that does not prevent them from using the
one copy they did pay for.  Just like a book bought at the bookstore.

Any copyright attorney should tell you the same thing, I expect.

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]




Re: [PHP] Ethics question...

2001-01-17 Thread Egan

On Thu, 18 Jan 2001 02:45:01 -0500, "Romulo Roberto Pereira"
<[EMAIL PROTECTED]> wrote:

>Copyright? This do not exist!!! See the case of NAPSTER

The law is one thing.  Whether people obey it or not, is another.


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]




Re: [PHP] below10host.com as webhost?

2001-01-18 Thread Egan

On Thu, 18 Jan 2001 01:54:28 -0600, "Jeff Lacy"
<[EMAIL PROTECTED]> wrote:

>anyone had thought/opinions on below10host.com as a web host?

I'm speaking as a budding competitor, so keep that in mind. :-)

According to their web page, below10host.com gives you 6GB per month
for $9.95.  By way of comparison, webservpro charges $49.95 per month
for the same 6GB.

My analysis of costs tells me that at $49.95 for 6GB, webservpro does
not have a large margin of profit in their price.  How can any hosting
company sell the same 6GB per month for $9.95 and make enough profit
to stay in business?

At such a low price, I don't know how it's possible, unless a large
majority of their customers consume so little of their quota so as to
offset the loss incurred from customers who consume it all.

6GB per month is a fairly active site.  If you really have that much
traffic, to me at least, $49.95 would seem affordable.  OTOH, if you
have much less traffic, you could choose a lower priced plan.

I believe in the adage of getting what you pay for.  Value is a
balance between low price on the one hand, vs. high quality on the
other.  The lowest price is not necessarily the best value.

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]




Re: [PHP] Sendmail User ID

2001-01-18 Thread Egan

On Thu, 18 Jan 2001 13:50:56 -0500, Yurais Fernández Leal
<[EMAIL PROTECTED]> wrote:


>The problem is, yes, I know that in the remote mail client the mail
>appears as if sent from [EMAIL PROTECTED], but in the sendmail
>connection, for example the Return-Path is set to the UID of the web
>server, the problem

This issue was discussed a few days ago in another thread.

The site performing final delivery determines Return-Path from the
envelope address.  That means you cannot control Return-Path by means
of header manipulation.

The only way to control the envelope address is to have the web server
call sendmail with the -f option as a trusted user.  The -f option
will let you specify any address.  This has great potential for abuse,
so you must tell sendmail, via its configuration, that the web server
UID can be trusted.

But before doing that, consider the potential for abuse.  For example,
in a virtual hosting environment, what would prevent PHP authors from
providing users with a web form which takes an email address input and
calls sendmail with the -f option, forcing it to use a possibly forced
address as the envelope address?

If the web server is a trusted sendmail user, any PHP script could do
that.  Whoa!


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]




Re: [PHP] I love/hate FrontPage - need another HTML editor.

2001-01-18 Thread Egan

On Thu, 18 Jan 2001 19:08:44 -0500, "Toby Butzon"
<[EMAIL PROTECTED]> wrote:

>Plus if you're just looking for soemthing to get your layout started, you
>can start in FrontPage and just never open PHP files in it once you start
>adding PHP ;)

I'm using HoTMetaL Pro 6.0.  It's great for table layout, and I can
open PHP files just fine.  I got it for $70 at Amazon.

It has bugs when encountering PHP standard tags, but using long tags
works around that problem.  Another benefit of using long tags is they
cause HoTMetaL to format your PHP code as-is, so you can control the
indenting of your PHP code however you like.

Also, there is no problem using the  Card number  SIZE="30" VALUE=""> 


Some have objected that not all ISPs enable short tags, but that's no
problem if you host with us.  We enabled them.  :-)

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]




Re: [PHP] Web hosting for PHP/MySQl development

2001-01-18 Thread Egan

>Any recommendations for a good, savvy host for doing some PHP/MySQL
>development? Not looking for a free service, obviously, but

> knowledgeable tech support

We try.

> good mysql/php 4/zend support

No Zend yet.

> decent mail handling

APOP for secure POP password.  Sendmail.  Not sure what else you mean.

> and developers tools like: telnet/ssh

Yes.

> emacs

Emacs, yikes!  I hate to imagine 100 users all loading emacs at the
same time.  This might be negotiable per account, upon request.  How
about vim in the meantime?

> procmail

Yes.

> crontab access

Yes, and I wonder how many others offer that?  Not many, I expect.


If you traceroute to vha.sevenkings.net vs. the competition, I think
we compare favorably.  We have good connectivity and ample bandwidth
near a major NAP in Chicago.  We're not on the backwaters like many
competitors are.

We're not fully open yet, but we're ready for some early testers.
Email me if you want to be one and I can let you have a test account
to try out at no charge (for a while, not forever).  We do ask that
testers bring less than 2GB traffic per month with them.  :-)


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]




Re: [PHP] below10host.com as webhost?

2001-01-18 Thread Egan

On Thu, 18 Jan 2001 23:11:28 -0600, "Jeff Lacy"
<[EMAIL PROTECTED]> wrote:

>I'm sorry, but why do you say webservpro doesn't make a lot of money?

If you analyze ISP costs as I have, I believe you may find that the
prices webservpro charges are about as low as they can go to still
provide good service, and yet make an honest profit at the end of the
day.

You may find many other providers charging $9.95 per month (or even
less!) for "unlimited" bandwidth, "unlimited" disk space, "unlimited"
POP accounts, and "unlimited" everything else you can imagine, but my
analysis tells me they cannot possibly make a profit if more than a
few of their customers actually take them up on their offer.

If you traceroute to compare network connectivity and latency among
hosting providers, I believe you will find those who have the best
also charge for most everything you use on some kind of scaled plan,
and don't go shouting "unlimited" at every customer who happens by.

>I am really looking for a good host for a 'friend' of mine.   He has a small
>website (<20mb) and I don't think it gets too many hits.  He doesn't have
>very much money to spend on a web host, so it must be something cheap.

We also offer Internet access in metro areas of the US and Canada, so
a bundle with  Internet access, web hosting, shell account, and DNS
service for his domain name can be as little as $24.95 per month.  Is
that cheap enough?

>needs php (4 would be better), and at least 20 email accounts.  A mysql
>database would be really, really good.  Ftp access (to upload pages) is a
>must, but telnet/ssh is always a plus.  The host need to allow domain names.
>I think this is about what my friend is looking for.  Does anyone have any
>ideas (besides below10host.com or phpwebhosting.com)?  Thanks again :-)

You may tell your "friend" we are offering (temporarily) free hosting
accounts to early testers, and we meet the requirements you mentioned
above.  We ask that testers bring no more than 2GB traffic per month
with them.

After we finish our testing program, I believe our hosting prices will
be competitive with webservpro.  That does not necessarily imply lower
prices, because we believe we offer excellent network connectivity and
bandwidth.  You get what you pay for.

To request a test account, please send email to me.  Thanks.

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]




Re: [PHP] Profanity Filter

2001-01-19 Thread Egan

On Fri, 19 Jan 2001 14:21:50 -0500 (EST), Ignacio Vazquez-Abrams
<[EMAIL PROTECTED]> wrote:

>>> Use a database for the words and say "SELECT 1 WHERE LOWERCASE('$name')

>> Yeah problem is he has no database support from his host

> Ouch. All is not lost, however:
>
> $words=Array(
> "f***",
> "s***",
>  ...

With a dictionary approach you would exhaust yourself trying to catch
all the combinations of words like goodf***, f***mehard, and so on.

A regular expression solution is needed.

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]




Re: [PHP] Profanity Filter

2001-01-19 Thread Egan

On Fri, 19 Jan 2001 14:34:08 -0500 (EST), Ignacio Vazquez-Abrams
<[EMAIL PROTECTED]> wrote:

>Check the code again. I'm not doing a dictionary approach.

Sorry, guess my speed reading got a little too fast. :-)

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]




Re: [PHP] RE: Ethics question...

2001-01-19 Thread Egan

On Fri, 19 Jan 2001 20:55:12 +, John Hinsley
<[EMAIL PROTECTED]> wrote:

>Incidentally, the must 2.4 gung ho distro seems to be SuSE, which I rate
>well above RedHat in terms of value, support and stability.

I like the way SuSE makes it easy to build and save a custom install
config which can be later repeated.  And the older text based YaST
package selection tool is easy to use when I need to add a package I
overlooked on the initial install.


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] Password security from PHP to MySQL

2001-01-25 Thread Egan

I know that ~.my.cnf with

  [client]
  password={mypass}

is the recommended method of securing your MySQL password when using a
shell command line to access MySQL.

But what is the recommended method for MySQL password security via
PHP?  Is there some way to make it use the ~.my.cnf file?

It seems to me that if you hardcode a MySQL password into your PHP
source code, it could become exposed inadvertently.  Forgive me if
this is already answered in the FAQ or manual.


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]




Re: [PHP] Safe_mode in certain directories

2001-06-22 Thread Egan

On Thu, 21 Jun 2001 14:35:50 -0700 (PDT), Rasmus Lerdorf
<[EMAIL PROTECTED]> wrote:

>If you are using Apache you can set any PHP directive in 
>or  block by doing something like:
>
>  php_admin_flag safe_mode On

Do those directives work in .htaccess files too?





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




Re: [PHP] Alternative to phpMyAdmin

2001-07-13 Thread Egan

On Fri, 13 Jul 2001 11:15:52 +0100, "Steve Brett"
<[EMAIL PROTECTED]> wrote:

>one of the guys i work for has an account with a service provider that gives
>mysql databases as part of his package. he has an account and password that
>is supplied when using mysql-front to connect to his database.

Does mysql-front encrypt the password before it travels the 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]




[PHP] Passwords and SSH port forwarding (was: Alternative to phpMyAdmin)

2001-07-13 Thread Egan

On Fri, 13 Jul 2001 12:28:37 -0400, "Matthew Loff" <[EMAIL PROTECTED]>
wrote:

>> Does mysql-front encrypt the password before it travels the net?

>It does support the compressed client/server protocol, which would make
>it harder to intercept-- but encryption is not an option yet on the
>client.
>
>I don't suppose there's any way on Win32 to use an SSH tunnel, is there?


I use SSH port forwarding to protect FTP passwords into my server.
Getting FTP to work with SSH port forwarding was more tricky than POP
or SMTP, but it can be done.  Also, the FTP server itself can be an
obstacle to making it work, depending on how it's configured.

Funny that, after figuring it out the first time, now it doesn't seem
so tricky after all.

It might work with MySQL, but I have not tried it.

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] free email providers

2001-07-16 Thread Egan

Hi,

I need to prohibit free email address domains when verifying account
information via email, and I found this list of free email providers:

  http://www.fepg.net/


Does anyone know of other lists, or better yet, have a text file of
free email domains?


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]




Re: [PHP] Re: free email providers

2001-07-16 Thread Egan

On Mon, 16 Jul 2001 14:41:35 -0300, "Inércia Sensorial"
<[EMAIL PROTECTED]> wrote:

>I am not trying to discredit your decision to don't accept free emails,
>but look for example my situation. The only email accounts I have are on
>free email providers. I also connect to the internet using a free ISP, so
>there's no pratical reason to use a paid email.

I encounter many sites that now refuse free email addresses.  That
alone is a practical reason to use a paid email or paid ISP.

I don't expect the free ISP concept to live much longer.  Look at
NetZero's share price.  They are in danger of delisting by nasdaq
soon.


>So it would be impossible to confirm my account on your service.

Yes, that is our intention.


>If it is a public service, where anyone can sign up, I think yo should
>reconsider your decision, unless there is a strong reason behind to not
>do it...

Free email addresses are virtually untraceable.  You can provide
totally fraudulent information when signing up with most of them.

That is unacceptable for our purposes.


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]




Re: [PHP] Credit card number checker?

2001-07-16 Thread Egan

On 16 Jul 2001 22:12:24 -, "Dr. Evil" <[EMAIL PROTECTED]> wrote:

>I know that credit cards have standard formats: There's a standard
>number of digits, and whether the card is Visa, MC, Amex, etc is
>encoded in the number, and there is some kind of checksum, and I think
>the expiration is also encoded in the number.  All of this is obvious
>stuff that anyone designing such a system would do.
>
>I'm wondering if anyone can refer me to a site that describes what
>this format is, so I can write some PHP code that will check to see if
>a credit card number format is correct.  I don't even want to try to
>run the card through my merchant account if the format is obviously
>wrong.  I assume that banks check the rejection rate on their merchant
>accounts, and too many bogus cards would not look good.

Right.

Especially since they don't have the card physically present, online
merchants should sanity check the card number before submitting it for
authorization.  Even honest customers could make a typing mistake that
renders their input completely bogus.

See page 2 of:


http://perl.about.com/library/weekly/aa073000a.htm




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




[PHP] php_value in htaccess, internal server error

2001-08-15 Thread Egan

I need to set some PHP values like:

  php_value session.save_path /a_more_secure_dir


in my .htaccess file.  But the main Apache httpd.conf file has:

  AllowOverride AuthConfig FileInfo Indexes


and php_value in .htaccess causes Apache internal server error!


Now if I change httpd.conf to say:

  AllowOverride All


then php_value works in .htaccess, with no error!


But as you know, using "AllowOverride All" in httpd.conf is BAD!  How
do I allow php_value in .htaccess, without it?  I tried:

  AllowOverride php_value


but Apache rejects it as a configuration error.  :-(

Help, please!


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]




Re: [PHP] php_value in htaccess, internal server error

2001-08-16 Thread Egan

On Thu, 16 Aug 2001 11:14:17 +0930, David Robley
<[EMAIL PROTECTED]> wrote:

>On Thu, 16 Aug 2001 03:08, Egan wrote:
>> I need to set some PHP values like:
>>
>>   php_value session.save_path /a_more_secure_dir

>Yuo might try allowovveride options


Yes, thanks.

I was trying to avoid "allowoverride options" because I did not want
users to set +Includes or +ExecCGI in their .htaccess files.

But since it was the only way to get php_value working in .htaccess, I
decided to use:

  
Options -ExecGGI -Includes
  

to override their .htaccess overrides, in case they try.


All happy now. :-)

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] chicken and egg problem with SID

2001-08-21 Thread Egan

I have a multi page sequence of input forms tied to a session.  It
works perfectly with cookies.  But I also want to make it work without
cookies, using:

php_value session.use_cookies 0
php_value session.use_trans_sid 1

in my .htaccess file, to use the SID support provided by PHP.

When testing this, I see that the SID works with all pages except the
first.  But because the first page has no SID passed to it in the URL,
the first instance of:

session_start();

creates a new session every time you refresh the first page with the
browser.  And that is the problem.  I only want one session to be
created, no matter how many times the user hits refresh on the first
page.

So then I tried setting the session id myself, hard coding it to some
arbitrary value like:



and that solves the multiple session problem; only one session is
created, no matter how many times you hit refresh on the first page. 

Yay!

But that still leaves a chicken and egg problem to solve:

I can generate some random value to be used for the session_id, but I
can't think of a good way to store it for use on the first page.

Since the first page does not get the SID in the URL, I need to set
the session_id before calling session_start.  But that means I don't
have any session where I can store my random value, for recalling it
later, on the next page refresh.

Ack!  I only need some simple way to store the SID value I generate,
before the page is loaded a second time.

I thought of using a CGI to dynamically generate all the PHP and HTML
for page 1, and also have the CGI put a random session_id value right
into the page source itself, just like I did when testing.  I suppose
that would work, but it seems like there should be an easier way.

Maybe there is some obvious solution, but it is not obvious to me at
the moment.

Has anyone else solved this problem, with a better method?  


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]




Re: [PHP] Re: chicken and egg problem with SID

2001-08-21 Thread Egan

On Tue, 21 Aug 2001 19:41:29 -0500, "Richard Lynch" <[EMAIL PROTECTED]>
wrote:

>> I can generate some random value to be used for the session_id, but I
>> can't think of a good way to store it for use on the first page.
>
>Why does it matter if they hit refresh and get a new session ID before
>you've collected any information about that ID?...


Good user interface design can be difficult to achieve in a browser
environment, and many of the browser form interfaces I have seen are
poorly designed in terms of user experience.

I've created a multipart form without any "page expired" messages, no
matter what the user does.  It's pretty slick, as far as browser form
interfaces go.

The user can use the browser back button, the browser forward button,
the browser refresh button, or the form "next" button anywhere in the
series of pages, all without disturbing any responses already entered.

Say they fill out 5 pages, then decide to go back and review the first
page before completing page 6.  In that case, I don't want to create a
new session, and thereby discard all the responses already entered, in
case they happen to hit refresh while on page 1.

Why? That's just good "user interface design 101."


>About all you *COULD* do is have a "fake" first page that does:
>
>$session_id = md5(rand());
>header("Location: page2.php?session_id=$session_id");
>?>
>


Art Wells gave me an idea how to do it all on a single page, and here
is what I worked out from his idea:

 


Thanks to all for the ideas!

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]




Re: [PHP] Creditcard checksum and identification

2001-08-22 Thread Egan

On Thu, 23 Aug 2001 00:22:28 +0200, Peter Ostry <[EMAIL PROTECTED]> wrote:

>Has anyone a PHP Script for the checksum of Creditcards?
>And a Script which can identify card types based on their first numbers?
>(VISA, AMEX, MASTER, DINERS, JBC, DISCOVERY)
>
>There where a lot of JavaScript pages on the web some years ago, but I 
>have lost my local copies and the pages are vanished...
>
>
>TIA,
>Peter

Here is what I use for Visa, MasterCard, AMEX, and Discover. Feel free
to improve it by adding other card types:



function test_mod10 ($mycard) {

$mylen = strlen($mycard);
$sumdigits = 0;

// Add doubled digits from odd/even positions in even/odd length
for ($tx = ($mylen % 2); $tx < $mylen; $tx += 2) {
$digit = substr($mycard, $tx, 1) * 2;
if ($digit < 10) {
$sumdigits += $digit;
} else {
$sumdigits += $digit - 9;
}
}

// Add single digits from even/odd postions in even/odd length
for ($tx = 1 - ($mylen % 2); $tx < $mylen; $tx += 2) {
$digit = substr($mycard, $tx, 1);
$sumdigits += $digit;
}

// If divisible by 10, return true
return (($sumdigits % 10) == 0);
}


$cn = $HTTP_GET_VARS['cn'];

$tn = substr(ereg_replace("[^0-9]", "", $cn) , 0, 25);

$vl = strlen($tn);
$v1 = substr($tn, 0, 1);
$v2 = substr($tn, 0, 2);
$v4 = substr($tn, 0, 4);

$ep_cn = '';

if ($ct == 'V') {
if (($vl != 13 && $vl != 16) || $v1 != 4 || !(test_mod10($tn))) {
$ep_cn = "$cn is not a Visa card.";
}

} elseif ($ct == 'M') {
if ($vl != 16 || $v1 != 5 || !(test_mod10($tn))) {
$ep_cn = "$cn is not a MasterCard.";
}

} elseif ($ct == 'A') {
if ($vl != 15 || $v2 != 37 || !(test_mod10($tn))) {
$ep_cn = "$cn is not an AMEX card.";
}

} elseif ($ct == 'D') {
if ($vl != 16 || !($v4 == 6100) || !(test_mod10($tn))) {
$ep_cn = "$cn is not a Discover card.";
}
}



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




Re: [PHP] GET method and forms....

2001-08-22 Thread Egan

On Thu, 23 Aug 2001 03:23:16 +0100, "Seb Frost" <[EMAIL PROTECTED]>
wrote:

>> how do I prevent getting &submit=shop%21 in the url window?

> reason to use get, I want variables to become part of the url.

Using a frameset prevents the GET url from appearing in the browser
window, if that's all you want to achieve -- and you don't need lynx
compatibility.

Here's a dummy frameset that should get you started.  Just put it in a
file by itself, perhaps named "myscript.html"

Also notice the second frame uses "myscript.php" as its source:


 


 
 
This document requires frames.





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




Re: [PHP] Advanced Form Processing HELP

2001-08-22 Thread Egan

On Thu, 23 Aug 2001 05:24:17 -0700, "Arcadius  A."
<[EMAIL PROTECTED]> wrote:

:
>How could i make the values filled in the  form  remain unchanged even after
>the user click on  the browser "Refresh/Reload" button without submittingf
>the form ?

Until they submit the form, PHP has nothing to act on.

For this problem, you need a client-side solution:  Javascript

  

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]




Re: [PHP] The future of PHP

2001-08-23 Thread Egan

On Thu, 23 Aug 2001 20:32:10 -0500, "Christopher CM Allen"
<[EMAIL PROTECTED]> wrote:

>hmmm, I might live in a smaller world than you but I find tons of  small to
>middle businesses that have no clue as to why or how things are done in
>applications(primarily web). Sure they know the buzz words of Java etc but
>when I come in and tell them I work with a certain tool set and that I can
>get it done for less $ and time they really don't care if I have a hammer or
>a mallet.

Many small businesses would like to do e-commerce, but can't afford
expensive consultants, expensive hardware, and expensive software
tools developed by huge corporations.

There is a vast market for web developers who use free software tools
like Linux/Apache/PHP, and offer their services to small businesses at
modest rates.

Look at all the large corporations bleeding money and cutting staff.
Mega-corporations are in decline, and their era is ending.  Long live
the small business!


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]




Re: [PHP] Maintaining a session without cookies

2001-08-24 Thread Egan

On Fri, 24 Aug 2001 17:33:51 +0100, "Saurabh Kapoor"
<[EMAIL PROTECTED]> wrote:

>I would like to maintain a session without cookies, what would be the best
>way of going about this?

You missed a related discussion by just a few days.  But here is a
summary of it ...

To initialize a session and force the browser to inject the PHPSESSID
string into the url of every page, including the first, use this code
in the very first page (and only the very first page!)


  



And then use this code on all pages you link to:


  



This approach has another benefit too:

On all pages you link to after the first, you can test the value of
"vsid" to see if it matches the value of PHPSESSID.  That way, you can
determine whether the user reached the other pages by going through
the initial page.  If not, you can reject the request with a message
like "improper request" or something similar.


In your php.ini, use:

  variables_order = "ECGPS"

to make GET data override cookie data, and use:

  session.use_trans_sid = 1

to have PHP inject the PHPSESSID string into document links (PHP also
needs a compile flag set, for this .ini value to work).  And to turn
off cookies, use:

  session.use_cookies = 0


Or if you have permission for setting these values in an .htaccess
file, then in .htaccess you can use:

  php_value session.use_cookies 0
  php_value session.use_trans_sid 1
  php_value variables_order "ECGPS"



Hope that helps!


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]




Re: [PHP] The future of PHP

2001-08-24 Thread Egan

On Fri, 24 Aug 2001 15:34:04 -0300, Manuel Lemos <[EMAIL PROTECTED]>
wrote:
 
>> Many small businesses would like to do e-commerce, but can't afford
>> expensive consultants, expensive hardware, and expensive software
>> tools developed by huge corporations.
>
>e-commerce? You mean B2C? Can small business live from that? I'm afraid
>not! Maybe I am wrong. :-)


100 years ago you could easily do business without a telephone.  But
what percentage of businesses today operate without a telephone?

A web presence with web commerce will become a utility like the
telephone.  Having it will be more important than measuring artificial
distinctions between B2C vs. B2B.

 
>> Look at all the large corporations bleeding money and cutting staff.
>> Mega-corporations are in decline, and their era is ending.  Long live
>> the small business!
>
>What? Large business are being affected because the whole networking
>business is in recession.


Large corporations don't know you or care about you as an individual
customer.  You're just an account number to them.  The only thing they
care about is the "big" sale to other "big" corporations.  But even
then, do they really care?  Not in my experience.

The networking recession is just one symptom of their disease.

Why would anyone want to do business that way?  If I can find a small
business that sells the service or product I need, that's who gets my
business first.

If people ask how large my company is, I tell them "We're large enough
to handle your business, and small enough to care."


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]




Re: [PHP] The future of PHP

2001-08-24 Thread Egan

On Fri, 24 Aug 2001 16:30:04 -0300, Manuel Lemos <[EMAIL PROTECTED]>
wrote:
 
>Can small business live from e-commerce today?

What is the relevance of your question?  Do businesses "live" from
their telephone?  Whether they do or not, they need it in either case.


>Do you really believe that? As far as I can recall, this recession
>started when a "mean judge" convicted Microsoft for anti-trust
>practices. That caused NASDAQ crash that scared people away from
>investing in tech company stocks.


One "mean judge" all by himself, caused the NASDAQ crash, eh?

I am surely astounded to learn that!  Good day and goodbye!



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]




Re: [PHP] The future of PHP

2001-08-24 Thread Egan

On Fri, 24 Aug 2001 14:40:47 -0500, "Navid Yar" <[EMAIL PROTECTED]>
wrote:

>Until Linux gets better at certain things, I think I have no choice but
>to stick with Windows for now (especially in the design area).

True enough, for now.

Steam locomotives were an impressive technology, deeply entrenched
with 100 years or more of history.  They did not disappear from
railroads overnight.  But when the railroads realized it was cheaper
to operate diesel locomotives, the end of the steam era was just a
matter of time.


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]




Re: [PHP] The future of PHP

2001-08-24 Thread Egan

On Fri, 24 Aug 2001 20:54:33 +0100, "Sean C. McCarthy"
<[EMAIL PROTECTED]> wrote:

>Also the effect that this downturn is going through all the chain, from
>transportation to food and goods. And BTW most companies that caused
>this were startups not really big companies. Much more information on
>this can be found on the Wall Street Journal.

WSJ writers can believe whatever they like.

But I believe this:

Large corporations are like railroad steam locomotives whose era has
ended.  They may continue running for a while, but in time, many will
disappear like the steam locomotive did.


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] virtual() call to CGI script

2001-08-27 Thread Egan

I use the PHP virtual() function to call a CGI script, and that works
fine.  But I need to prevent the CGI from being executed directly, in
case someone tries to access its URL.

Since HTTP_REFERER is unreliable, I was wondering how others have
solved this problem ...


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]




Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Egan

On Tue, 28 Aug 2001 16:38:14 +1000, "Jason Brooke" <[EMAIL PROTECTED]> wrote:

>> I use the PHP virtual() function to call a CGI script, and that works
>> fine.  But I need to prevent the CGI from being executed directly, in
>> case someone tries to access its URL.
>>
>> Since HTTP_REFERER is unreliable, I was wondering how others have
>> solved this problem ...

>move it out of the document tree if you don't want it executed via http, and
>use system or exec or something instead of virtual

Thanks for the idea, but ...

That would cause the script to be executed with permissions of the web
server, and for security, that is generally prohibited by the ISP (we
are the ISP).  The only exception to that rule is public scripts which
reside in:

  safe_mode_exec_dir = /host/runphp

and are thus allowed to execute with permissions of the web server.

To provide for the execution of private user CGIs, each user has their
own /cgi directory.  Apache is configured to recognize /cgi in any URL
as an executable CGI, and wraps all user CGIs with SuEXEC, to run them
with permissions of the user, not the web server.

But of course that means user scripts are accessible via URL.  So the
question remains, how to limit their access.

As the ISP, we could use any feature of the web server for our own
CGIs, but we intentionally avoid that.  We have a hosting environment
with a rich set of customer accessible tools, and we demonstrate that
fact by using only those tools ourselves.  IOW, we use what we sell.

I have some techniques for limiting access to user CGIs, but I still
wonder how others have approached this problem ...


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]




Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Egan

On Tue, 28 Aug 2001 23:38:30 +1000, "Jason Brooke" <[EMAIL PROTECTED]> wrote:

>if you're using apache, something along the lines of the following untested
>directives should prevent anyone but the localhost (which is where your
>virtual() calls should be coming from) from accessing the cgi's via http
>
>
>order deny, allow
>deny from all
>allow from localhost
>


We don't define any virtual hosts in httpd.conf; instead, we use a
custom handler hooked into post-read-request.  So I won't be able to
define "/path/to/usr/cgi" in httpd.conf.

But if that concept will work in user .htaccess files, it would be an
improvement over my current techniques.  I'll give it a try ...

Thanks for the idea!


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]




Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Egan

On Wed, 29 Aug 2001 00:16:10 +1000, "Jason Brooke" <[EMAIL PROTECTED]> wrote:

>It will work in .htaccess if you enable it, or you might even be able to use
>something like:
>
>
>(untested again)


After testing this I see that:

Apache uses the IP address of the remote host to determine whether to
allow or deny access.

Even though PHP is running on localhost, and making a request via the
virtual() function, Apache still knows the IP address of the remote
host, and uses that.

So what happens is that denying "localhost" makes it impossible to run
the CGI at all, unless you are running lynx from a local shell.  Not
exactly what I had in mind.

Unless there is some way that Apache can be tricked into believing a
request originates from the IP address of localhost, it appears that
allow/deny directives will not solve the problem of preventing direct
access to user CGIs.

It sounded like a good idea, though!


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]




Re: [PHP] virtual() call to CGI script

2001-08-28 Thread Egan

On Wed, 29 Aug 2001 02:14:10 +1000, "Jason Brooke" <[EMAIL PROTECTED]> wrote:

>Another way you might be able to do it is find an environment variable that
>is only present when the cgi's are executed by the virtual() call,

Could not find any ...


>use the apache SetEnvIf directive combined with 

But that gave me an idea for a solution with .htaccess control, and
after some testing, I was able to work it out:


My document root .htaccess file includes:

  SetEnvIf Request_URI "the_cgi_caller\.php$" CGI_REFERER=local


And my /cgi subdirectory .htaccess file includes:

  Order Allow,Deny
  Allow from env=CGI_REFERER


The environment variable CGI_REFERER does not exist unless Apache is
processing a request for "the_cgi_caller.php" in document root, and
thus requesting any file in the /cgi subdirectory via its URL results
in a HTTP Error 403 - Forbidden.

And since PHP virtual() causes Apache to execute a sub-request, the
environment variable CGI_REFERER *does* exist while the CGI is being
called via virtual() from "the_cgi_caller.php"

It will be simple to add SetEnvIf lines to .htaccess in document root,
one for each .php file which needs to call a CGI with virtual().

This is the solution I was looking for.  Thanks for the ideas!


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]




Re: [PHP] The future of PHP

2001-08-30 Thread Egan

On Thu, 30 Aug 2001 02:52:33 -0500, "Richard Lynch" <[EMAIL PROTECTED]>
wrote:

>Which dot-bomb had a business plan, with a revenue model, which did *NOT*
>involve going into heavy debt and blowing huge piles of VC money for several
>years in a market-share grab on the Internet, where the barrier to change
>brands is one (1) click

Internet market share is an illusion when you can change brands with a
few clicks.  The only way to keep Internet customers is to provide
good service and products at competitive prices, and continue doing so
year after year.

It's virtually impossible for big corporations to compete on that
playing field, because their overhead costs are too high.  The only
way they can sell at a competitive price is to lose money on every
sale, a dead-end tactic that only works until you burn through all
your investors' cash.

Businesses need profit to survive.  So why would any business be
willing to lose money on a sale?  To gain Internet market share which
is an illusion in the first place?  Obviously, that's a fundamental
mistake made by many large corporations trying to grab Internet market
share.

Small businesses, like CDBaby, are the future of this market.


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] Assign multiple variables from mysql_fetch_row() call

2001-09-04 Thread Egan

In perl I can say something like:

   ($var1, $var2) = $sqh->fetchrow_array()


to assign column values to more than one variable at a time.  So I
tried similar syntax with PHP:


($var1, $var2) = mysql_fetch_row($sqh);


but could not seem to work it out.

I know you can do this with a temporary array, and then take values
out of the array.  But it would be nice to omit the temporary array.

Is it possible?


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]




Re: [PHP] Assign multiple variables from mysql_fetch_row() call

2001-09-04 Thread Egan

On Tue, 4 Sep 2001 14:29:42 -0700 (PDT), Rasmus Lerdorf
<[EMAIL PROTECTED]> wrote:

>> In perl I can say something like:
>>
>>($var1, $var2) = $sqh->fetchrow_array()

>($var1, $var2) is magic.  I hate magic.  What do you look up in the Perl
>manual when you hit syntax like that?  In PHP the equivalent syntax is:
>
>list($var1, $var2) = ...
>
>It does exactly the same thing, and it is legible.


Sorry, I didn't mean to start a flame war.

I only wanted to know if there was a simple way of doing it, without
using a temporary array.  The only reason I mentioned perl is because
I did not know any other way to frame the question.

Your suggestion looks like just what I need, thanks!


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]




Re: [PHP] PHP Cron jobs

2001-01-27 Thread Egan

On Sat, 27 Jan 2001 18:05:08 +1030, "James Mclean"
<[EMAIL PROTECTED]> wrote:

>i do not have access to the cron system on my server

>The Sysadmin for the server is absolutly useless, so getting him to submit a
>cron job is no good.
>any ideas??


My idea:

We provide user cron access with your shell account.  Apache, PHP and
MySQL hosting near the major Chicago NAP.

Send me an email and I can give you a test account.

:-)



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] PHP MySQL password

2001-01-30 Thread Egan

I know that ~.my.cnf with

  [client]
  password={mypass}

is the recommended method of securing your MySQL password when using a
shell command line to access MySQL.

But what is the recommended method for MySQL password security via
PHP?  Is there some way to make it use the ~.my.cnf file?

It seems to me that if you hardcode a MySQL password into your PHP
source code, it could become exposed inadvertently.


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] Undefined variable error message

2002-12-18 Thread Michael Egan
All of the PHP scripts hosted on a Linux server I'm working with have suddenly begun 
producing an error message:

undefined variable 'variablename'

This occurs wherever a variable name is referred to.  I'm concerned about this for two 
reasons:

1   Will I have to go through each script making substantial alterations?

2   Has the configuration of PHP been altered in some way without my knowledge?

The latter would suggest fairly significant security issues.  Does anybody have any 
ideas as to how this might have occurred and the quickest way of resolving it?  Or of 
links to possible solutions?

This is particularly irritating as last night was the office Christmas party and I'm 
in a rather fragile state this morning :-(

Michael Egan

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




RE: [PHP] Undefined variable error message[Scanned]

2002-12-18 Thread Michael Egan
Jon,

Many thanks - the actual problem is now solved.

As to how it occurred I think must be attributable to me at some stage in terms of 
fiddling around with the php.ini file.  Perhaps I've had too many nights like last 
night and the brain cells are depleting past a critical point!

Thanks to everybody else who responded to this query.

Michael Egan

-Original Message-
From: Jon Haworth [mailto:[EMAIL PROTECTED]]
Sent: 18 December 2002 10:39
To: Michael Egan; PHP General (E-mail)
Subject: RE: [PHP] Undefined variable error message[Scanned]


Hi Michael,

> All of the PHP scripts hosted on a Linux server 
> I'm working with have suddenly begun producing 
> an error message:
>
>   undefined variable 'variablename'

Looks like someone's tweaked the error reporting level so it's on E_ALL,
which can be a somewhat alarmist setting :-)

Read all about it at http://php.net/manual/en/ref.errorfunc.php

> The latter would suggest fairly significant 
> security issues.  Does anybody have any ideas 
> as to how this might have occurred 

Are you on a shared host, or is there someone else who admins your box? If
so, have a word with them and see if they've been fiddling with php.ini -
that's where the error reporting level is set.

Cheers
Jon

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




RE: [PHP] date part[Scanned]

2002-12-19 Thread Michael Egan
You could use the explode function to break the string down into its different 
elements with '/' as the delimiter.

Problem is if you're allowing users to input the date into a text box you can't be 
sure how they'll enter the data.  The better option is probably to constrain what they 
can enter with drop down boxes for year, month and day.

Michael Egan

-Original Message-
From: Diana Castillo [mailto:[EMAIL PROTECTED]]
Sent: 19 December 2002 14:05
To: [EMAIL PROTECTED]
Subject: [PHP] date part[Scanned]


How can I get a string containing the month part of a date the user types
in?
e.g. if they type in "06/07/200" I want to get "06"

thanks,
diana



-- 
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] XHTML Validator Problem

2003-01-07 Thread Michael Egan
I've finally got round to making some attempt to validating the pages of a site I've 
done with PHP using the W3C XHTML Validator.  However, it's throwing out errors 
wherever I use session control on pages.

The server generates PHP Session ID variables which are added to links to other pages 
but my understanding is that these are rejected on the basis that the '&' and '=' 
characters are invalid (I might be wrong here).

Examples of the error messages generated by the validator are given below:

Line 154, column 102: cannot generate system identifier for general entity "PHPSESSID" 
  ...u' href='competitions.php?option=add&PHPSESSID=888a059dbc17855c09885c3ea978df
  ^
Line 154, column 102: general entity "PHPSESSID" not defined and no default entity 
(explain... <http://validator.w3.org/docs/errors.html>). 
  ...u' href='competitions.php?option=add&PHPSESSID=888a059dbc17855c09885c3ea978df
  ^

These are the only error messages left - having dealt with the dozens of others left 
in through my own sloppy coding :-(

I'm not sure how to tackle this given that these elements of the page are generated 
automatically.

Is there a way round this or are there any sources of information relating to this 
area?

Thanks in advance,

Michael Egan

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




RE: Re[2]: [PHP] XHTML Validator Problem[Scanned]

2003-01-07 Thread Michael Egan
Tom,

Thanks again. This gives me full control over things which always seems the best 
solution.

Michael 

> You can put this at the top of your scripts:

> ini_set('arg_separator.output','&');



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




RE: [PHP] Development tools[Scanned]

2003-01-07 Thread Michael Egan
Didier,

I'm afraid you really are asking for some harsh responses.

Your last comment in particular invites some rather obvious, albeit rude, acronyms.

> I just started on both of them and wanting to learn how to use them, 
> but I know the tools could speed up the process, especially I am a learn > by doing 
>type of guy.

Perhaps a search on Google for Java or C++ might help you out.

Michael Egan

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




RE: [PHP] Development tools[Scanned]

2003-01-07 Thread Michael Egan
Didier,

I meant to say Java and C++ IDEs.

Regards,

Michael Egan

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




RE: [PHP] Development tools[Scanned]

2003-01-07 Thread Michael Egan
Didier,

It's not that people object to stupid questions being posed - or, indeed poor use of 
English. Some of the best responses to queries I've seen are from people for whom 
English is not their first language.

What people do object to is questions being posed to the incorrect lists - I'm sure 
there are plenty of forums and mailing lists dedicated to both the areas you are keen 
to investigate. These will undoubtedly be the better sources of information.

By keeping the lists dedicated to specific areas, even where these can interact, the 
lists are kept to more manageable proportions.

Good luck with your explorations.

Michael Egan

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




RE: [PHP] undefined variable notice - how to furn of[Scanned]

2003-01-09 Thread Michael Egan
Borut,

I had this problem myself just before Christmas.

The following solution was proposed:

>> All of the PHP scripts hosted on a Linux server 
>> I'm working with have suddenly begun producing 
>> an error message:
>>
>>  undefined variable 'variablename'

> Looks like someone's tweaked the error reporting level so it's on E_ALL,
> which can be a somewhat alarmist setting :-)

> Read all about it at http://php.net/manual/en/ref.errorfunc.php

Michael Egan



-Original Message-
From: Borut Kovacec [mailto:[EMAIL PROTECTED]]
Sent: 09 January 2003 15:57
To: PHP Mailing List
Subject: [PHP] undefined variable notice - how to furn of[Scanned]


Hi

I just installed new php 4.2.3 on Win XP, Apache 1.3.24..
Everything works fine, just now I'm getting "Notice" messages for every undefined 
variable or undefined index in arrays..

So now I have to use issset() everytime to avoid this messages... 

..is there any way to turn this messages off, because if prior versions I never got 
them..??

Borut

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




RE: [PHP] XHTML Validator Problem[Scanned]

2003-01-07 Thread Michael Egan
Tom,

Thanks for that.

I don't have access to the server on which the site is being run but I'll suggest the 
change to the hosting company.

Michael Egan

-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]]
Sent: 07 January 2003 10:57
To: Michael Egan
Cc: PHP General (E-mail)
Subject: Re: [PHP] XHTML Validator Problem[Scanned]


Hi,

Tuesday, January 7, 2003, 6:58:08 PM, you wrote:
ME> I've finally got round to making some attempt to validating the pages of a site 
I've done with PHP using the W3C XHTML Validator.  However, it's throwing out errors 
wherever I use session control
ME> on pages.

ME> The server generates PHP Session ID variables which are added to links to other 
pages but my understanding is that these are rejected on the basis that the '&' and 
'=' characters are invalid (I
ME> might be wrong here).

ME> Examples of the error messages generated by the validator are given below:

ME> Line 154, column 102: cannot generate system identifier for general entity 
"PHPSESSID" 
ME>   ...u' href='competitions.php?option=add&PHPSESSID=888a059dbc17855c09885c3ea978df
ME>   ^
ME> Line 154, column 102: general entity "PHPSESSID" not defined and no default entity 
(explain... <http://validator.w3.org/docs/errors.html>). 
ME>   ...u' href='competitions.php?option=add&PHPSESSID=888a059dbc17855c09885c3ea978df
ME>   ^

ME> These are the only error messages left - having dealt with the dozens of others 
left in through my own sloppy coding :-(

ME> I'm not sure how to tackle this given that these elements of the page are 
generated automatically.

ME> Is there a way round this or are there any sources of information relating to this 
area?

ME> Thanks in advance,

ME> Michael Egan

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


In your php.ini set arg_separator.output to &
That should fix it.

-- 
regards,
Tom


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




RE: [PHP] Live chat screen[Scanned]

2003-02-24 Thread Michael Egan
Sami,

You could put the 'chat screen' within a frame and set the page with a refresh value 
within the meta tags so that it reloads every few seconds, i.e.



Hope this helps,

Michael Egan


-Original Message-
From: Sami Kyösti [mailto:[EMAIL PROTECTED]
Sent: 24 February 2003 13:35
To: [EMAIL PROTECTED]
Subject: [PHP] Live chat screen[Scanned]


Hi!

Is it possible to create a chat screen that updates screen in some kind 
of loop from the database?

So if someone sends a message to database it immediately shows on chat 
screen?

Kind regards,
Sami


-- 
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] what are the planned features of php 5?[Scanned]

2003-02-26 Thread Michael Egan
Neko,

Out of curiosity I had a look at the php.net site and related sites and eventually 
came across this link:

http://www.zend.com/images/press/Feb_2003-4_Zeev_PHP5.pdf

I think this gives the details you're after.

Michael Egan

-Original Message-
From: neko [mailto:[EMAIL PROTECTED]
Sent: 26 February 2003 10:58
To: [EMAIL PROTECTED]
Subject: [PHP] what are the planned features of php 5?[Scanned]


I read something a while back about more OO features, but I was wondering if
there is a roadmap anywhere?

cheers,
neko



-- 
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] Re: Checking for empty values sent from a form[Scanned]

2003-03-06 Thread Michael Egan
Have you tried echoing out the $query just to ensure that all the expected values are 
being passed to this?

If the old_email field is blank I think it will carry out the update but no rows will 
be affected.

Michael

-Original Message-
From: Leendert [mailto:[EMAIL PROTECTED]
Sent: 06 March 2003 14:24
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Checking for empty values sent from a
form[Scanned]


You usually don't want spaces either

foreach($_POST as $val)
{
if(strlen(trim($val)) < 1)
// do what you want
}


"Rick Emery" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> foreach($HTTP_POST_VARS as $val)
>   if($val=="")
>   {
>   do something
>   }
> - Original Message -
> From: "shaun" <[EMAIL PROTECTED]>
> To: <>
> Sent: Thursday, March 06, 2003 7:45 AM
> Subject: [PHP] Re: Checking for empty values sent from a form
>
>
> thanks for your reply but I was wondering if there was a way to check
> through all of the form entries with an easier way that
>
> if ($_POST['your_input_name'] == '' || $_POST['your_input_name'] == '' ||
> $_POST['your_input_name'] == '' || $_POST['your_input_name'] == '' ) //etc
>   // field is empty
>
> this would be particularly useful for forms with lots of fields...
>
>
> "Niels Andersen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Since input from a form are strings, you can check like this:
> >
> > if ($_POST['your_input_name'] == '')
> >   // field is empty
> >
> > "Shaun" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Is there an easy way to scan through an array of values sent from a
form
> > to
> > > see if any of them are empty?
> > >
> > >
> >
> >
>
>
>
> --
> 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] Problem updating[Scanned]

2003-03-06 Thread Michael Egan
Join the club.

I spent some time looking at your original post - submitted a response - but 
associated it with the wrong thread!

Apologies to all!

Michael

-Original Message-
From: Steve Jackson [mailto:[EMAIL PROTECTED]
Sent: 06 March 2003 15:00
To: 'Tom Rogers'
Cc: 'PHP General'
Subject: RE: [PHP] Problem updating[Scanned]


Actually it didn't need the globals,
But I did need to pass the variables into the function!
Update_subscriber_account($var1, $var2 etc)
I feel a right plonker now!

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159





> -Original Message-
> From: Tom Rogers [mailto:[EMAIL PROTECTED] 
> Sent: 6. maaliskuuta 2003 16:28
> To: Steve Jackson
> Cc: PHP General
> Subject: Re: [PHP] Problem updating
> 
> 
> Hi,
> 
> Friday, March 7, 2003, 12:27:27 AM, you wrote:
> SJ> Been on this a couple of hours... anyone see what I'm 
> doing wrong? I 
> SJ> get a result of 1 when I echo $result but it doesn't want 
> to update 
> SJ> at all. The action of this form 
> index.php?action=update-account is 
> SJ> just a switch case
> SJ> Which asks you to use the function 
> update_subscriber_account() below...
> 
> SJ> 
> SJ>
> SJ>
> SJ>  
> SJ> $title 
> SJ>  
> SJ>
> SJ>
> SJ>  Real Name:
> SJ>   SJ>   value ='$realname'>
> SJ>
> SJ>
> SJ>  Preferred Name:
> SJ>   SJ>   value ='$nickname'>
> SJ>
> SJ>
> SJ>  Company:
> SJ>   SJ>   value ='$company'>
> SJ>
> SJ>
> SJ>  Email Address:
> SJ>   SJ>   value ='$email'>
> SJ>
> SJ>
> SJ>  Requested Email Format:";
> SJ>  echo " SJ>if ($mimetype == 'T') 
> SJ>   echo " selected";
> SJ>echo ">Text Only SJ>if ($mimetype == 'H') 
> SJ>   echo " selected";
> SJ>echo ">HTML";
> SJ> print "
> SJ> 
> SJ> ";
> SJ> display_form_button('save-changes');
> SJ> print "";
> SJ> }
> SJ> }
> 
> SJ> function update_subscriber_account()
> SJ> {
> 
> SJ> db_connect();
> SJ> $query = "update subscribers 
> SJ> set email = '$new_email',
> SJ> nickname = '$new_nickname',
> SJ> fullname = '$new_realname',
> SJ> company = '$new_company',
> SJ> mimetype = '$new_mimetype'
> SJ> where email = '$old_id'";
> SJ> $result = mysql_query($query)or die("Error: Could not update 
> SJ> query$query".mysql_error());
> SJ> if (!$result)
> SJ> {
> SJ> echo "An error occurred when trying to update the DB";
> SJ> }
> SJ> else
> SJ> {
> SJ> echo "$result & Successfully updated the details";
> SJ> }
> SJ> }
> 
> You will need to use the global vars and also escape quotes like this:
> 
> function update_subscriber_account()
> {
>  $new_email = addslashes($_POST['new_email']);
>  .
>  .
>  .
> $query = "update subscribers
> 
> set email = '$new_email',
> .
> .
> 
> -- 
> regards,
> Tom
> 
> 
> -- 
> 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] newbie[Scanned]

2003-03-11 Thread Michael Egan
Robin,

There really are a huge amount of resources on the web for this.

The PHP online manual itself is good for reference but for step by step guides you 
might want something different.

I came across a fairly comprehensive guide on developing PHP based databases at: 
www.keithjbrown.co.uk/vworks/php/ - though I confess I haven't worked my way through 
it.

Personally I like to have something in hard copy to work my way through. There are a 
wide range of books about PHP - with a number from Wrox that I tend to use a lot - see 
www.wrox.com.  There's one called 'Beginning PHP' that will take you through all you 
need to get started.

Good luck,

Michael



-Original Message-
From: Robin [mailto:[EMAIL PROTECTED]
Sent: 11 March 2003 08:02
To: [EMAIL PROTECTED]
Subject: [PHP] newbie[Scanned]


Hello

Please could somebody point me in the right direction for learning about
PHP?

Any links would be greatfully appreciated!

Thanks


Robin



-- 
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] Making a Loop.[Scanned]

2003-03-12 Thread Michael Egan
Philip,

I might be missing something but just looking at the top few lines of your code the 
$number variable has no value.

The loop will run on howver many times corresponds to this value - with the value 
being null it's not going to run.

You'll need to pass in a value from elsewhere.

Michael Egan

-Original Message-
From: Philip J. Newman [mailto:[EMAIL PROTECTED]
Sent: 12 March 2003 08:21
To: [EMAIL PROTECTED]
Subject: [PHP] Making a Loop.[Scanned]


I have this code to make this form list $x amount of times.

  for ($i = 1; $i <= $number; $i++) {

  echo"";

   // LIST ALL PRODUCTS IN DATABASE.

   $sql = "SELECT * FROM products ORDER BY productCode ASC";
  $sql_result = mysql_query($sql, $connection) or die ("Could not
get Query");

  while ($row = mysql_fetch_array($sql_result)) {

   $productCode=$row["productCode"];
   echo "$productCode";

   } // END WHILE.

 echo"";


  }

and it dose not work any help?

--
Philip J. Newman.
Head Developer
[EMAIL PROTECTED]

+64 (9) 576 9491
+64 021-048-3999

--
Friends are like stars
You can't allways see them,
but they are always there.

--
Websites:

PhilipNZ.com - Design.
http://www.philipnz.com/
[EMAIL PROTECTED]

Philip's Domain // Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]

Vital Kiwi / NEWMAN.NET.NZ.
http://www.newman.net.nz/
[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



RE: [PHP] Forms & PHP[Scanned]

2003-07-02 Thread Michael Egan
If I've understood your initial email correctly another approach would be to save the 
contents of the form to your database and populate the form fields presented 
subsequently with information retrieved from the database.

You can use the header function to redirect to whatever page you wish once the 
information has been saved.

Regards,

Michael Egan



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



RE: [PHP] Retaining formatting problem[Scanned]

2003-07-08 Thread Michael Egan
I've experienced the same problem. It's not that the line returns disappear - they 
will still be retained but stored as /n or /r.  

You'll need to find a way of replacing the line breaks with a html paragraph break - 
assuming your required output is html. Perhaps some of the regexp functions will help 
in this - I haven't got the code I used for this to hand.

HTH,

Michael Egan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 08 July 2003 10:30
To: [EMAIL PROTECTED]
Subject: [PHP] Retaining formatting problem[Scanned]


Hello everyone,

I have a long running problem that i just want to get covered, I have a standard text 
box for people to insert long lengths of text.

This text box is in a standard  but when I insert it into the 
database the line returns dissapear, eg 

"this 

little amount of

text"

will enter like

"this little amount of text will enter like"

Please help me it is p!!$$!ng me right off :P

Cheers in advance

-- 
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] Ereg sass[Scanned]

2003-03-18 Thread Michael Egan
Try

[A-Za-z0-9_\-\.]*

-Original Message-
From: Liam Gibbs [mailto:[EMAIL PROTECTED]
Sent: 18 March 2003 08:52
To: php list
Subject: Re: [PHP] Ereg sass[Scanned]


> try two backslashes to escape php special characters

Tried that with the same result.



> I'm not sure why, but I can't include a period in my eregi statement:
> 
> [A-Za-z0-9_-.]*
> 
> For this, I get Warning: ereg() [function.ereg]: REG_ERANGE in
> /home/website/public_html/Functions.inc on line 27
> 
> The same goes for [A-Za-z0-9_-\.]*
> 
> Anyone know why?
> 
> 
> 


-- 
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] random letter/character?[Scanned]

2003-03-19 Thread Michael Egan
I put together the following function to give me a password consisting of random 
letters and numbers.  It should be fairly clear as to how you'd need to tweak it to 
just give you the characters you'd need interspersed with spaces.

Hope this helps - I also hope anybody else is fairly gentle with their criticisms and 
pointers to whatever is wrong with the script - this is the first time I've ventured 
to include something like this in a response to an email on the list :-(


   function get_password()
   {
  // Create the password variable as an array
  $temp_password = array();
  // Create an array of the letters of the alphabet
  $letters = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k",
   "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v",
   "w", "x", "y", "z");
  // Get the first three alpha characters of the password
  for($row = 0; $row < 3; $row ++)
  {
srand ((double) microtime() * 100);
$rand_number = rand(0, 25);
$letter = $letters[$rand_number];
array_push($temp_password, $letter);
  }
  // Get five numeric characters to complete the password
  for($row = 0; $row < 5; $row ++)
  {
srand ((double) microtime() * 100);
$rand_number = rand(0, 9);
array_push($temp_password, $rand_number);
  }
  // Convert the array into a single string
  for ($row = 0; $row < count($temp_password); $row ++)
  {
$password .=  $temp_password[$row];
  }
  // Return the password to the script that called the function
  return $password;
   }


By the way - I put this together one evening after consuming five pints of Jameson's 
with one arm tied behind my back and whilst wearing a blindfold!


Michael Egan



-Original Message-
From: Bryan Koschmann - GKT [mailto:[EMAIL PROTECTED]
Sent: 19 March 2003 07:44
To: PHP General
Subject: [PHP] random letter/character?[Scanned]


Hi,

I need to get a php script to print out a list of random characters. This
is the list:

a'
b'
c'
d'
e'
f'
g'
a''
b''
c''
d''
e''
f''
g''

They would be printed to a maximum of 50 in a row separated by spaces. Can
anyone give me a pointer as to how to do this? Since the rand functions
are only for numbers, maybe assign each character group a number?

Thanks in advance!

Bryan


-- 
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] Addslashes problem (MSSQL)[Scanned]

2003-03-20 Thread Michael Egan
Kelvin,

This link should be helpful:

http://www.mysql.com/doc/en/String_syntax.html

Regards,

Michael Egan

-Original Message-
From: Poon, Kelvin (Infomart) [mailto:[EMAIL PROTECTED]
Sent: 20 March 2003 16:21
To: 'Lowell Allen'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Addslashes problem (MSSQL)[Scanned]



What do you mean by "It escapes single quotes with single quotes."?

so let's say my $content is 

lalal 'lalalal' "lalala"


then what do I have to do to $content in order to insert to my MSSQL table?
-Original Message-
From: Lowell Allen [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 11:20 AM
To: PHP
Subject: Re: [PHP] Addslashes problem (MSSQL)


MS-SQL doesn't escape with slashes. It escapes single quotes with single
quotes.

--
Lowell Allen

> From: "Poon, Kelvin (Infomart)" <[EMAIL PROTECTED]>
> Date: Thu, 20 Mar 2003 10:58:02 -0500
> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Subject: [PHP] Addslashes problem (MSSQL)
> 
> Hi,
> 
> I have a problem that lets you add a record to a database.  THere is a
> problem with it, and the following is the area of the program where it has
> problem.
> 
> 
> 
> $created_date = date('m, d, Y');
> 
> $title = strip_tags($title);
> $keywords = strip_tags($keywords);
> $content = strip_tags($content);
> $product = strip_tags($product);
> 
> 
> if (!get_magic_quotes_gpc()) {
> $title = addslashes($title);
> $keywords = addslashes($keywords);
> $product = addslashes($product);
> $content = addslashes($content);
> }
> 
> $query = "SELECT * FROM knowledgeBase";
> $result = mssql_query($query);
> 
> $ID = mssql_num_rows($result);
> $ID += 1;
> 
> $query2 = "INSERT INTO knowledgeBase(
> ID,
> Title,
> Keywords,
> Content,
> [Created Date],
> [Updated Date],
> Product)
> VALUES(
> '".$ID."',
> '".$title."',
> '".$keywords."',
> '".$content."',
> '".$created_date."',
> 'Never',
> '".$product."')";
> $result2 = mssql_query($query2);
> 
> 
> 
> where my $content value is osmethign like this.
> 
> "Step 1: Access the homepage
> Step 2: type in your username under the field 'username' "
> 
> and after the addslashes funciton there would be \ around the 'username'
> like this..
> \'username\'and now after running this program I got an error message:
> 
> Warning: MS SQL message: Line 14: Incorrect syntax near 'username'.
> (severity 15) in
d:\apache_docroots\internal.infomart.ca\infodesk\kb_add.php
> on line 119
> 
> Warning: MS SQL: Query failed in
> d:\apache_docroots\internal.infomart.ca\infodesk\kb_add.php on line 119
> 
> 
> 
> does any body have any idea?  I did the same thing with another problem
but
> it worked fine.  I have no idea what the problem is.  I know I need to
> addslashes to the string since I am putting it in the valuable
> $query2..please advise..
> 
> THanks!.
> 
> 
> -- 
> 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


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



RE: [PHP] gd library + animated gif[Scanned]

2003-03-28 Thread Michael Egan
There's a section on Freshmeat about the ImageMagick project with further links:

http://freshmeat.net/projects/imagemagick/?topic_id=100

Given your previous comment it's tempting to say that a search on Google for 
'ImageMagick' would, er - well - but I'll resist :-)

Regards,

Michael


>> Can GD library produce animated gif's?

> The PHP manual will tell you this. I'll save you the trouble, but next
>time... well... the PHP manual will tell you stuff like this:

> Since a certain version of PHP, GIFs are unsupported. I'm told they can be
> read, but as far as producing new ones (resizing, changing, etc.) there's a
> copyright issue over its encryption method. To use GD completely, go wtih
> JPG or PNG. But, there is ImageMagick(?). Check that out. Anyone got a URL?


-- 
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] Zip to postcode[Scanned]

2003-04-02 Thread Michael Egan
Andy,

There are some ready made scripts for dealing with UK post codes on the relevant page 
on the PHP site:

http://www.php.net/manual/en/function.ereg.php


HTH,

Michael Egan

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]
Sent: 02 April 2003 12:54
To: [EMAIL PROTECTED]
Subject: [PHP] Zip to postcode[Scanned]


Can someone please tell me how i change the following code:
if (!ereg("^[0-9]{5,5}(\-[0-9]{4,4})?$",$postcode))

to a UK postcode QQ1 1QQ
When i fill out the form it tells me that the postcode is not valid and i
think it is because it is in zip code format.

Thank you

Andy



-- 
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] My Sincere Request!![Scanned]

2003-05-27 Thread Michael Egan
And what exactly has this got to do with PHP :-)

-Original Message-
From: REV DR EGO MOMOH [mailto:[EMAIL PROTECTED]
Sent: 01 January 1999 17:59
To: [EMAIL PROTECTED]
Subject: [PHP] My Sincere Request!![Scanned]


BRANCH MANAGER, 
UNITED BANK FOR AFRICA PLC 
ILUPEJU BRANCH LAGOS NIGERIA 
ATTN: PRESIDENT/C.E.O 
I am pleased to get across to you for a very urgent and profitable business proposal, 
though I don't know you neither have I seen you before but my confidence was reposed 
on you when the Chief Executive of Lagos State chamber of Commerce and Industry handed 
me yourcontact for a confidential business. I am the manager of United Bank for Africa 
Plc (UBA),Ilupeju branch, Lagos Nigeria.The intended business is thus; We had a 
customer, a Foreigner (a Turkish) resident in Nigeria, he was a Contractor with one of 
the Government Parastatals.He has in his Account in my branch the sum of US 38.6 
Million (Thirty Eight Million, Six HundredThousandU.SDollars).Unfortunately, the man 
died four years ago until today non-of his next of kin has come forward to claim the 
money. Having noticed this, I in collaboration with two other top Officials of the 
bank have covered up the account all this while. Now we want you (being a foreigner) 
to be fronted as one of his next of kin and forward your account and other relevant 
documents to be advised to you by us to attest to the Claim. We will use our positions 
to get all internal documentations to back up the claims . The whole procedures will 
last only five working days to get the fund retrieved successfully without trace even 
now or in future.Your response is only what we are waiting for as we have arranged all 
necessary things. As soon as this message comes to you kindly get back to me 
indicating your interest, then I will furnish you with the whole procedures to ensure 
that the deal is successfully concluded. For your assistance we have agreed to give 
you twenty five percent (25%) of the Total sum at the end of the transaction while 65% 
would be for my colleagues and I and the remaining 10% would be for any form 
ofexpenses that may be incurred during the course of the transaction which would be 
given to us when the money is transferred into your account before splitting the 
balance on the agreed percentage of 65% to 25%. In order to get all the legal 
documents from the court, kindly send the following information to us immediately. 
Your full name,telephone,mobile and fax numbers as well as your resident or company 
address. I await your earliest response. 
Thanks, 
Yours Sincerely 
REV DR EGO MOMOH.



-- 
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] Checking for existing records

2003-06-02 Thread Michael Egan
Hello all,

I'm looking for the sort of programming inspiration I suspect I won't find in manuals 
- I have checked the web first!

When saving records to a table I generally do a fairly standard check to ensure that 
there is not already a record of the same name.  I even put a big warning message on 
the page asking users to check to ensure that a record of a particular name doesn't 
already exist before they create a new record.  But this hasn't stopped entries such 
as the following:

Record x: "The Prince's Trust"
Record y: "The Princes Trust"
Record z: "the Prince's Trust"

Two of these were entered as consecutive records by the same person!

I know I won't be able to make any application entirely foolproof but are there any 
steps I could use within the combination of MySQL and PHP that might minimize such 
duplication?

Thanks in advance,

Michael Egan

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



RE: [PHP] Checking for existing records[Scanned]

2003-06-02 Thread Michael Egan
Thanks - I'll try to add these checks. 

Life would be so much easier if it weren't for the users :-)



Michael Egan



-Original Message-
From: Jay Blanchard [mailto:[EMAIL PROTECTED]
Sent: 02 June 2003 14:38
To: Michael Egan; PHP General (E-mail)
Subject: RE: [PHP] Checking for existing records[Scanned]


[snip]
When saving records to a table I generally do a fairly standard check to
ensure that there is not already a record of the same name.  I even put
a big warning message on the page asking users to check to ensure that a
record of a particular name doesn't already exist before they create a
new record.  But this hasn't stopped entries such as the following:

Record x: "The Prince's Trust"
Record y: "The Princes Trust"
Record z: "the Prince's Trust"

I know I won't be able to make any application entirely foolproof but
are there any steps I could use within the combination of MySQL and PHP
that might minimize such duplication?
[/snip]

Just some very quick thoughts

Convert to either all uppers or all lowers (in the background) and check
againsts something done to the DB similarly. I would say that you could
do a LIKE query against the DB entries where the string length is
similar (a diff of one or two characters, but this could be really
innefficent and perhaps inaccurate. I am in the middle of trying to make
a LIKE query more efficientit is a bear! Anyhow, that is some very
quick thoughts...

HTH!

Jay

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



RE: [PHP] Checking for existing records[Scanned]

2003-06-03 Thread Michael Egan
I should have looked at the manual a bit more thoroughly.

I've just come across the similar_text() function which should do just what I'm after 
:-)

Thanks,

Michael Egan

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



RE: [PHP] Checking for existing records[Scanned]

2003-06-03 Thread Michael Egan
Thanks Daniel.

I think the approach I'll settle for will be to do an initial check to make sure that 
no record of exactly the same name exists and then look through the records to see if 
there are any similar records using the similar_text() function.

I'll present the records from the second stage to the user to prompt them to see if 
they really want to add the record name they have just entered.

If there are any improvements to this I'll be happy to take them on board.

I confess that by far and away my preferred solution would be to get the staff of the 
section using the application to put their brains into gear before using it - but I 
suppose if everybody did this some of us might be out of a job.

Sorry about the rant but it's been one of those weeks - and it's only Monday!!

Thanks,

Michael Egan

-Original Message-
From: Daniel Stark [mailto:[EMAIL PROTECTED]
Sent: 02 June 2003 15:11
To: Michael Egan
Cc: PHP General (E-mail)
Subject: Re: [PHP] Checking for existing records[Scanned]


You might also look into word stemming (removing suffixes and possibly 
prefixes) and comparing stemmed titles. Another possibility would be to 
find a list of commonly misspelled/misused words like (there, their, 
they're) and substitute all possibilities with one version for the 
purposes of checking the title. Also removing stop words like (the, of, 
and) and then comparing titles would be a good method. Hint: lots of 
these methods are used in Keyword finding algorithms.

You might also make the process more interactive for your users. If you 
find a title through the above methods that seems like a hit present it 
to the user and say:

"The following records were already found in the system, please verify 
that the record you are adding is unique."

Then let the user indicate whether the record is in fact unique.

hth,
Dan


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



RE: [PHP] error reporting linenumber and filename[Scanned]

2003-06-16 Thread Michael Egan
Use the predefined constant:

__LINE__

Regards,

Michael Egan

-Original Message-
From: Bas Jobsen [mailto:[EMAIL PROTECTED]
Sent: 16 June 2003 12:50
To: PHP General
Subject: [PHP] error reporting linenumber and filename[Scanned]


Hi,

Running the code below, shows an errror in line 2 as expected.
How do i get the linenumber of the function call? 3 here.



Best regards,

Bas

-- 
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] Why Fatal Error ?[Scanned]

2003-06-19 Thread Michael Egan
Tony,

It might be that somewhere in your code there is a loop or while structure that has an 
error.  This is running endlessly until you run out of memory which is when you see 
the error message.

Check the structures within the code to ensure that they are correct.

HTH,

Michael Egan

-Original Message-
From: Tony Arcucci [mailto:[EMAIL PROTECTED]
Sent: 19 June 2003 15:33
To: [EMAIL PROTECTED]
Subject: [PHP] Why Fatal Error ?[Scanned]


Why this error ( Linux Redhat 8.0, PHP 4.2.2):

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 1048576 bytes) in /var/www/html/xpai/xmail.class on line 71

  Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to
allocate 131 bytes) in Unknown on line 0

In PHP.INI memory_limit id 60M.




-- 
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] sessions and browser back[Scanned]

2003-06-25 Thread Michael Egan
Bibhas,

I'm sure I've read somewhere that this is a deliberate security feature with using 
sessions - i.e. you can't view contents of form fields by using the back button on 
your browser.

Couldn't you use JavaScript to ensure that the data is validated on the client side 
before the form is submitted?  

Regards,

Michael Egan

-Original Message-
From: Bibhas Kumar Samanta [mailto:[EMAIL PROTECTED]
Sent: 25 June 2003 14:26
To: [EMAIL PROTECTED]
Subject: [PHP] sessions and browser back[Scanned]


Hi,

I am trying to create restricted pages for my php/mysql/apache
server with sessions and passing session varibales to other pages for 
validation.

Eventually I am doinng session_start() at the begining and
checking whether logged in user is authorised to use this page
by a routine.

Now problem is, if filled in data in the form is incorrect, the forms 
gives an error. But when I press browser BACK button to get the
filled in form , the form seems to get reset with _no_ data.

When I try without session_start() at the begining  of form , things
seem to behave normally.

Does session_start() reset the form  and I guess browser should
have returned be by fiiled in page from cache ?

Please help

-Bibhas

-- 
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] passwd protected page[Scanned]

2003-06-26 Thread Michael Egan
Bibhas,

I've seen many references to the phpBB application on this list in the past and had a 
look at it in detail some weeks ago.  It's a fairly large application but the way they 
deal with sessions is instructive.

If I've understood it correctly they don't use the session management features in PHP 
but create their own.  When a user visits the site a session is created with a unique 
identifier. This is then stored in a sessions table in the database.  The session ID 
is passed to other pages as the user visits them either by use of cookies or by 
appending the session id to each url. If the user logs in then the user id is also 
stored in the relevant sessions table and other information about the user is pulled 
from a users table for that user id.

If you download the application - www.phpbb.com - you'll find the relevant code in the 
sessions file within the includes directory - though they have recently upgraded the 
application so this might have changed.

HTH,

Michael Egan


-Original Message-
From: Bibhas Kumar Samanta [mailto:[EMAIL PROTECTED]
Sent: 26 June 2003 08:23
To: Chris Kay
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] passwd protected page[Scanned]


my problem is that when I use sessions in the restricted pages
the session_start() seem to reset the form  ( when other filled in data 
is lost) when go back to the form using
Back in the browser.
So I wanted to avoid session_start

How are the good php sites designed ?

regds,
Bibhas




Chris Kay wrote:
> 
> Why not use sessions, store a $loggedin value in a session or cookie
> And check that at the top of each page.. no session = no access
> 
> Hope this helps
> 
> -
> Chris Kay
> Techex Communications
> Website: www.techex.com.au Email: [EMAIL PROTECTED]
> Telephone: 1300 88 111 2 - Fax: 1300 882 221
> -
> 
> -Original Message-
> From: Bibhas Kumar Samanta [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 26 June 2003 5:14 PM
> To: Sichta Daniel
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] passwd protected page
> 
> how should I pass the logged in user to other pages ?
> In the database at the same time there might be several user
> logged in ?
> 
> Thanks,
> Bibhas
> 
> Sichta Daniel wrote:
> >
> > Hi,
> >
> > You can validate user on login page and sets the flag in database
> table.
> > Then on each page you have to check that flag again 
> >
> > DS
> >
> > -Original Message-
> > From: Bibhas Kumar Samanta [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 26, 2003 8:52 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] passwd protected page
> >
> > Hi,
> >
> > Without using sessions , how can I create
> > passwd protected pages in mysql/php.
> >
> > I need to remember the user from login page and
> > validate this user in other pages.
> >
> > Thanks,
> > Bibhas
> >
> > --
> > 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
> 
> --
> Message protected by MailGuard: e-mail anti-virus, anti-spam and content
> filtering.
> http://www.mailguard.com.au/mg
> 
> --
> 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] need help breaking out of loop.[Scanned]

2003-06-26 Thread Michael Egan
Anders,

Are you missing a '|' in the if condition?


Michael Egan

-Original Message-
From: anders thoresson [mailto:[EMAIL PROTECTED]
Sent: 26 June 2003 12:01
To: [EMAIL PROTECTED]
Subject: [PHP] need help breaking out of loop.[Scanned]


Hi,

 I'm working of a PHP-MySQL-planning system for a newspaper. I want to add 
dates and number for each issue. I have to following code, where 
$current_date is a unix timestamp.

 If $current_date is a Saturday or Sunday, I want to quit the current 
execution of the loop and contiune with the next date. But when the if- 
clause that checks if $issue_day_of_week is Sunday or Saturday is included 
in my while-loop, everything stalls. Without it, everything goes smooth.

 What am I missing?

while ($i <= $number_of_days)
{
$issue_date = strftime("%Y-%m-%d", $current_date);
$issue_month = date("m", $current_date);
$issue_day = date("d", $current_date);
$issue_day_of_week = date("l", $current_date);

// Check that $issue_date isn't Saturday or Sunday

if ($issue_day_of_week == "Sunday" | $issue_day_of_week == "Saturday")
{
continue;
}

if ($issue_month == 1 & $issue_day == 1)
{
$issue_number = 1;
$current_date = $current_date + 86400;
$i++;
$issue_number++;
continue;
}
$current_date = $current_date + 86400;  
$i++;
$issue_number++;
}

-- 
anders thoresson

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

2002-08-14 Thread Michael Egan

Some quick thoughts:

Is the $Namak variable being correctly passed to the query?

Have you tried to echo out the query just to see precisely what is being passed to 
MySQL?

On the first line of the query:

$query  ="Insert into Kel (NIP,Id_kel,Nama,Status)";

You might need a space after ')' before passing it to MySQL.


Michael Egan

-Original Message-
From: Remon Redika [mailto:[EMAIL PROTECTED]]
Sent: 14 August 2002 01:23
To: [EMAIL PROTECTED]
Subject: [PHP] Variable 


this is the form
 -- insert.php  


 Nama Satu
 
   
 
   
 Nama Dua
 
   
 
   
 Nama Tiga
 
   
 
   
 variable and my query -- 

$Namak = $namasa;
$Namak = $Namak.$namadu;
$Namak = $Namak.$namati; 

$query  ="Insert into Kel (NIP,Id_kel,Nama,Status)";
$query .="Values ('$NIP','$Id_kel','$Namak','$Status')"; 

the problem is my query cant execute the variable $Namak
i got failed message from mysql query 

help 

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

2002-08-21 Thread Michael Egan

Steve,

I think it's fairly standard that hosts provide you with a single database.

A suggestion made with earlier thread, which I follow, is simply to make sure you set 
up your tables with names that clearly identify their function to you.

Michael Egan

-Original Message-
From: Steve Jackson [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2002 23:35
To: MySQL General Mailing list; PHP General
Subject: [PHP] phpMyAdmin


Is it possible to use phpMyAdmin to add new databases (not tables whole
databases) to my website? I ask because currently my host has provided
me with one database and I don't want to mix database tables when adding
new features (such as shopping carts and bulletin boards)? I am new to
MySQL and PHP so would like some advice, is the way I describe
(databases for each website function) a good way to design or should I
have all my functions in one large database?

Steve Jackson
Web Developer
Viola Systems Ltd.
http://www.violasystems.com
[EMAIL PROTECTED]
Mobile +358 50 343 5159




-- 
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] Sorting a multi-dimensional array

2002-08-21 Thread Michael Egan

Ben,

I don't know whether this is the most efficient way of doing things but when I've 
tried in the past to sort multidimensional arrays according to a number of values I've 
ended up giving up on the PHP functions and creating a temporary table in MySQL.  

You can then retrieve the information sorted by various fields defined in your query 
to the database.

Others may well advise that this is not the best way of doing this but it's worked for 
me and has saved me beating myself up over not being able to get to grips with some 
complex functions!

Michael Egan


-Original Message-
From: Ben [mailto:[EMAIL PROTECTED]]
Sent: 20 August 2002 18:25
To: [EMAIL PROTECTED]
Subject: [PHP] Sorting a multi-dimensional array


I have looked at array_multisort, asort, etc. NONE of them do what I need.

My array looks like this:

$array[0][0] = First Id;
$array[0][1] = First Name;
$array[0][2] = First Rating;

$array[1][0] = Second Id;
$array[1][1] = Second Name;
$array[1][2] = Second Rating;

$array[2][0] = Third Id;
$array[2][1] = Third Name;
$array[2][2] = Third Rating;


Now, I want to sort the array (very very fast if possible cuz the array is
huge...150 such values) based on the "Rating" for each candidate, which is
the third column inside this matrix array. How should I ask PHP to do this?
Also, when I do sort by the Rating I want the ID and the name to remain the
same for each candidate, i.e., I want the indexes to be maintained.

HELP!

Thanks in advance
Ben



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

2002-08-21 Thread Michael Egan

I know similar threads have come up on this in the past but I suspect it's a 
constantly changing picture.

I recently saw a favourable review of Zend Studio 2.5 but wondered, out of curiosity, 
what sort of tools people use to develop PHP scripts and MySQL databases, tables and 
queries.

Up until now, in an attempt to try and get to grips with these packages, I've been 
using a variety of text editors from VI to Kwrite.  But I'm wondering whether it might 
speed up development times if I start to use one of the tools out there for working 
with PHP and MySQL.

Any thoughts?

Michael Egan

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




RE: [PHP] Low Cost PHP Hosting

2002-09-06 Thread Michael Egan

Philip,

I've found UK Linux (http://www.uklinux.net) to offer a good service at low cost.  
They also offer 50% discount for charities.

Michael Egan

-Original Message-
From: Philip Radford [mailto:[EMAIL PROTECTED]]
Sent: 06 September 2002 05:47
To: [EMAIL PROTECTED]
Subject: [PHP] Low Cost PHP Hosting


Hi All,

I have recently subscribed to the list and would like to thank everyone for their 
support and guidance in the use of the PHP scripting language. I am trying to find a 
low cost host for testing out PHP web applications on the Internet. I have a similar 
account set up with Brinkster for ASP and ASP.NET code but would like a similar 
environment for PHP. Any ideas? Thanks.

Regards
Phil.



-- 
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] jpeg thumbnail errors

2002-09-17 Thread Michael Egan


Warwick,

There are different ways of compiling PHP which will determine which elements it can 
support.

The first error you report shows that the particular build of PHP being used hasn't 
been compiled to create images from JPEGS. The remaining errors flow on from this as 
no image has been supplied to them.

You would need to recompile PHP so that such support is offered - no mean feat from my 
own experiences. I gave up :-(

Michael Egan


-Original Message-
From: Warwick Berg [mailto:[EMAIL PROTECTED]]
Sent: 17 September 2002 00:08
To: [EMAIL PROTECTED]
Subject: [PHP] jpeg thumbnail errors


Hi all

I know very little about PHP and am enquiring for a mate who's got some
problems. Could some kind soul tell me what the errors below might mean?
He's using PHP 4.1.2. I can supply the scripts that cause the error if that
will help? He says they occur when a jpeg is being uploaded and created into
a thumbnail.

Thanks in advance.

Thanks
Warwick




When a jpeg is being uploaded and created into a thumbnail:

Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
167

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
168

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
169

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
171

Warning: ImageJpeg: No JPG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
172

Warning: ImageCreateFromJpeg: No JPEG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
167

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
168

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
169

Warning: Supplied argument is not a valid Image resource in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
171

Warning: ImageJpeg: No JPG support in this PHP build in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php on line
172

Warning: Cannot add header information - headers already sent by (output
started at
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/common.php:167) in
/home/hsphere/local/home/nexcen0/datnet.org/classifieds/account.php on line
91




-- 
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] jpeg thumbnail errors

2002-09-17 Thread Michael Egan

Tony,

When I first began dabbling with PHP a year or more ago I did try to reconfigure PHP 
to gain support for PDF files. I was using SUSE 7.0 at the time. 

I was determined to get to grips with configuring packages such as PHP, Apache and 
MySQL but I seemed to run into one problem after another.

I'm determined to have another go at this. With this in mind I've set one computer up 
with an older Linux distribution and intend to have a go at LFS over the next few 
weeks. Hopefully I will eventually overcome my fears of configuring software on a 
Linux system.

Thanks for the help.

Michael Egan

-Original Message-
From: Tony Earnshaw [mailto:[EMAIL PROTECTED]]
Sent: 17 September 2002 11:44
To: Michael Egan
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] jpeg thumbnail errors


tir, 2002-09-17 kl. 09:53 skrev Michael Egan:

> You would need to recompile PHP so that such support is
> offered - no mean feat from my own experiences. I gave up :-(

What's your exact problem, Michael?

I'm so new to PHP4 (done nothing at all with PHP for the last 3-4 years,
now I need to), that I'm reading, practicing reading etc. I don't even
have any questions, yet, I'm so green.

But I *do* know that I have compiled in jpg and png support to PHP 4.2.3
(phpinfo).

On Red Hat 7.2 +++, './configure --with-gd' - and other things, of
course.

Best,

Tony

-- 

Tony Earnshaw

Tha can allway tell a Yorkshireman, but tha canna tell 'im much.

e-post: [EMAIL PROTECTED]
www:http://www.billy.demon.nl
gpg public key: http://www.billy.demon.nl/tonni.armor

Telefoon:   (+31) (0)172 530428
Mobiel: (+31) (0)6 51153356

GPG Fingerprint = 3924 6BF8 A755 DE1A 4AD6 FA2B F7D7 6051 3BE7 B981
3BE7B981



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




RE: [PHP] Wrap content with a layout file

2002-09-23 Thread Michael Egan

I generally do the same - have a header and footer file which create a three column 
table. The content then fits into the central column.

Other ways of doing this might be to use frames (though many disapprove of frames) or 
to use the iframe tag - the latter is something I only recently became aware of but 
can be quite useful and is not as messy as frames.

Michael Egan

-Original Message-
From: Patrick Lebon [mailto:[EMAIL PROTECTED]]
Sent: 23 September 2002 06:47
To: [EMAIL PROTECTED]
Subject: [PHP] Wrap content with a layout file


Is there a way to create a layout file that can wrap around other pages with
data in them. I am currently using two includes (one at the start of the
page and one at the end) but was wondering if there is a better way to do
this.
Thanks



-- 
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] Looking for a forum

2002-09-26 Thread Michael Egan

There are a huge number of forums at php.resourceindex.com

These range from fairly basic forums such as venomboard to more complex forums such as 
phpbb

Michael Egan



-Original Message-
From: John Taylor-Johnston [mailto:[EMAIL PROTECTED]]
Sent: 26 September 2002 06:26
To: [EMAIL PROTECTED]
Subject: [PHP] Looking for a forum


Hi,
I'm looking for some forum script, a bit like this:
http://www.chevelles.com/cgi-bin/forum/Ultimate.cgi
Can anyone post a link to something useful?
John


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




  1   2   >