Re: [PHP] looking for a PHP editor

2001-01-10 Thread Toby Miller

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

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

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

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

-Toby

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


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


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




Re: [PHP] Quick Shipping

2001-01-22 Thread Toby Miller

Dave,

This guy wrote a class to figure out UPS shipping rates. You might be able
to start with it. Just go to the CODE section. I found it through
Google.com.

http://www.brogdon.net/~darrell/

Toby

- Original Message -
From: "Dave M." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 22, 2001 8:48 PM
Subject: [PHP] Quick Shipping


Does anyone have a piece of code that calculates shipping costs in real
time, that could easily be placed into an existing e-commerce site?

Thanks.
Dave M.



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

2001-02-21 Thread Toby Miller

Here's another story to use as an "I told you so" if you choose to try them
anyway.

CI Host. We have been hosting with them for almost two years now. The only
reason we never left was because we couldn't find anyone else offering the
same redundant connections that we could actually verify. A lot of people
claim to have these awesome networks, but have you ever actually tried to
find out detailed information about their network? You know, like location,
security, who their providers are, etc. Most likely they are not a real
hosting provider, but just someone else with a dedicated hosting package on
someone else's network. You'd be amazed.

Here are just some of the situations we've had to endure with CI Host.

We were hosting a NT client who we wrote a CGI application for. When one of
our admins put the CGI application in the cgi-bin and attempted to execute
it they got a permission error saying they couldn't execute the application.
So they went to the support chat to try to get one of the technical support
staff to see why the permissions were failing. After 30 minutes of waiting
on others currently being helped they started evaluating the situation.
After our admin explained what was going on the technician said, you
shouldn't be allowed to execute EXE's on our servers. Then for the shocker.
The technician revoked our execute permissions and muted our admin in chat.
This of course, not only prevented our application from working, but every
other stock cgi which is provided by CI Host in the cgi-bin with all new
hosting accounts. Needless to say this took several days to sort out and
there was no apology.

We signed up some dial-up accounts for a few of our employees to use from
home. We did the request online and the accounts were activated the next
day. These employees used these accounts for at least four months. We never
received invoices for these accounts, though we asked every month why they
were not on the invoices and they would say they'd look into it, which they
never did. At the end of that four months we cancelled the dial-up accounts
as those employees finally got cable connections at home so they didn't need
us to provide them with dial-up access any longer. Anyhow, it was 2 months
after that when we finally got an invoice. It was for all "6" months (they
never cancelled the accounts) and they billed us for a dial-up package that
we never activated. We simply activated a normal dial-up, but they billed us
for some deluxe dial-up that included hosting and a slew of other features
that we never used. So instead of $25.00 a month for each account for four
months which should have been around $200.00 we were billed around $720.00
for 6 months of $60.00 a month dial-ups. It took 7 additional months to get
that straightened out which caused our hosting account to be de-activated
several times in the process because of our refusal to pay it. Even though
the account was placed under review and promised it would not be shut down.

On at least 4 different occasions we have been hung up on by tech support.
Once they even deleted all of the user accounts to MySQL on one of the
servers we had a site on. This took several days to get straightened out.
Their billing is anything but acceptable. Their technical support is
sporadic at best. They seem to have outgrown their abilities and it shows in
their day to day processes. While there are so many other things that I
could post about it's really just ranting as we have finally found an
alternative that we've been testing out for the past few months and we've
been very happy with the results.

Check out MyBizHosting at
http://www.mybizhosting.com/

They're fairly new, but their connection is just awesome and the technical
support is great. While they don't give away the same amount of storage that
CI Host does with all of their accounts you can upgrade the accounts
whenever you need to. Besides, how many sites actually use 600MB of space?
We only have one client that even exceeds 150MB. They have online billing
and invoice history (which is actually accurate and current, unlike CI
Host's online billing system). Their control panel (which is provided with
every account puts CI Host's Monster Controls to shame) is also excellent.
It allows you make changes to just about any aspect of your hosting account.
So check them out if you haven't already. They've managed to impress us so
far.

Toby

- Original Message -
From: "Thomas Deliduka" <[EMAIL PROTECTED]>
To: "PHP List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 21, 2001 9:21 AM
Subject: Re: [PHP] Terrible Hosting Experience


> On 2/20/01 5:55 PM this was written:
>
> > I was about to buy a server from Alabanza.  Am I ever glad I didn't.
The
> > only thing impressive about them is their connection.  And for all I
know
> > they could be lying about that, as well.
>
> Usdatacenters.com has a great connection. We've had great help with them.
> They may be a tad high but their support is impeccable.

[PHP] SSL Submission

2001-03-14 Thread Toby Miller

Hey all,

I'm currently using Perl for one of my applications to make secure (SSL) form 
submissions to an outside server. Based on the response I get back from the server my 
application does different things. Unfortunately, this app is all in Perl and has 
outgrown it's original code and continues to grow. So I really want to re-write the 
application but I want to do it in PHP. Now for my problem. What functions or 
libraries or classes exist in PHP that are equivalent to the secure posts that I'm 
doing up above in Perl? I've heard that CURL will allow this but I haven't seen any 
evidence leading me to believe that it supports secure form submissions, just secure 
file requests. Can anyone point me in the right direction? Is this even feasible?

Thanks,
Toby




Re: [PHP] SSL SSL SSL SSL -- READ THIS!!!!!!

2001-04-18 Thread Toby Miller


- Original Message -
From: "phpman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, April 17, 2001 4:55 PM
Subject: [PHP] SSL SSL SSL SSL -- READ THIS!!


> How do I establish an SSL socket connection with PHP?
> I have PHP compiled in an Apache Mod_SSL server. Do I need to compile PHP
> with
> some sort of open_ssl option? I have --enable-sockets in the command line.
> Please help!!!
>
> -dave
>
>
>
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] mySQL Question....

2001-04-18 Thread Toby Miller

How about actually using distinct?

SELECT DISTINCT(email_addr) FROM myTable WHERE x = 1

--Toby

- Original Message - 
From: "Jason Caldwell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 1:47 AM
Subject: [PHP] mySQL Question


> if i perform a SELECT query (say) like the following:
> 
> SELECT email_addr FROM myTable WHERE x = 1
> 
> in this query i want to pull-out (or list) all email addresses where x
> equals 1, however, suppose i don't want any duplicate email addresses...
> 
> would i use ORDER BY and COUNT(*) to get listing of non-duplicate email
> addresses, and just ignore the COUNT() ?
> 
> Thanks.
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Site Structure

2001-04-23 Thread Toby Miller

Jordan,

Not true. If you make your PHP includes look like this:

include("$DOCUMENT_ROOT/includes/header.inc");

Then you can make your image calls with an absolute URL like this:



Also, it's not a good idea to use the .inc extension unless you've
associated it with PHP. The reason is if I type the URL directly to
/includes/header.inc I will get the source code for that file in text
format. However, if you named it header.inc.php it will still follow an
intelligent naming convention, but will still get interpreted if someone
tries to access it directly. This will most likely result in an error or
will just display a blank page depending on what your header file does.
Either way it doesn't open your source code up to anonymous users. This is
why Martin is suggesting you to store your include files outside of the root
web directory so people can't directly access your source code. So either do
what I've suggested or do what Martin suggested, but it is definitely worth
the effort to do one of the two.

--Toby


- Original Message -
From: "Jordan Elver" <[EMAIL PROTECTED]>
To: "Ben Cairns" <[EMAIL PROTECTED]>
Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 11:28 AM
Subject: Re: [PHP] Site Structure


> Hi,
> Thanks for the reply. I can do that but then the images will not be in the
> correct location?
>
> Jordan
>
> On Monday 23 April 2001 15:58, you wrote:
> > give the include() function a complete path:
> >
> > include '/apache/htdocs/include/yourfile.inc.php';
> >
> >
> > -- Ben Cairns - Head Of Technical Operations
> > intasept.COM
> > Tel: 01332 365333
> > Fax: 01332 346010
> > E-Mail: [EMAIL PROTECTED]
> > Web: http://www.intasept.com
> >
> > "MAKING sense of
> > the INFORMATION
> > TECHNOLOGY age
> > @ WORK.."
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Site Structure

2001-04-23 Thread Toby Miller

While it is true that you don't have to put your files in the web directory
at all and it is a more secure option there is still one very large
inconvenience that prevents me from going with that option. You lose the
usefulness of just including "$DOCUMENT_ROOT/yourfolder/yourfilename". This
is the main reason that I do put my files in the root web directory. So how
do you tell all of your files where your included content is? Do you hard
code the path in every page? If so, do you also have development, stage, and
live environments that mimic the exact same directory structures? If not, do
you always change the include strings by hand every time you move from one
environment to another? Do you run into these problems? What kind of
solutions/workarounds have you implemented?

I have always used this style of including documents because it enables me
to do my mockup ideas on my Windows machine with PWS. Then I can move onto
my Linux test box and try the site in my home account. Then I can push the
exact same code to the dev server which uses www as the root web directory.
Then I can push the exact same code to the staging server for clients to see
which has wwwroot as the root web directory and the live environment mimics
the stage environment so that move makes little to no difference. Now if
someone else was working on the same project and checked the files out of
CVS they would have to tweak their copy to work in their special environment
instead of just running and developing the files. This just seems like a
whole lot of extra work to me. Correct me if I'm wrong, but the only way
anyone can see the source code of a php file if the extension is associated
with the PHP interpreter is if you provide a phps file that they can see or
if someone uninstalls the PHP interpreter (which bypasses the situation
because the first condition is no longer being met).

I'm really curious to see how other developers handle these kind of
development situations.

- Original Message -
From: "indrek siitan" <[EMAIL PROTECTED]>
To: "Toby Miller" <[EMAIL PROTECTED]>; "Jordan Elver"
<[EMAIL PROTECTED]>
Cc: "PHP General Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, April 23, 2001 1:22 PM
Subject: RE: [PHP] Site Structure


> Hi,
>
> > Also, it's not a good idea to use the .inc extension unless you've
> > associated it with PHP. The reason is if I type the URL directly to
> > /includes/header.inc I will get the source code for that file in text
> > format.
>
> you don't have to keep your .inc files in the web server document
> root folder at all...
>
>
> Rgds,
>   Tfr
>
>  --==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia
>==--


-- 
PHP General Mailing List (http://www.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]OT, but dual-boot operating system question

2001-04-30 Thread Toby Miller

Your safest bet would probably be to look into RedHat Linux. It's a fairly
straight forward Linux distribution. It also includes the LILO boot loader
which is one way to boot into more than one operating system on the same
machine.

- Original Message -
From: "Chris Cocuzzo" <[EMAIL PROTECTED]>
To: "PHP General List (E-mail)" <[EMAIL PROTECTED]>
Sent: Saturday, April 28, 2001 12:36 PM
Subject: [PHP]OT, but dual-boot operating system question


> Hey,
>
> completely OT i know...
>
> In a few months when I put together for college, I'm considering doing a
> dual-boot type system, with some windows OS, and also a unix OS. However,
I
> don't know that much about any free unix OS' that are out there. The two I
> can think of to use would be Solaris and Linux. Can anyone give me some
> advice on which to use, and also if possible point me to a site where I
can
> get information on doing this type of thing?
>
> Chris
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Please review our coding standards [ ideas ]

2001-05-01 Thread Toby Miller

What I always do would probably fill both needs. My filenames usually look
like this:

URL Files - can be accessed directly through the browser

filename.php -> Normal PHP files

Non-URL Files - are hidden from the browser either by means of .htaccess or
by being moved outside of the root web directory

filename.inc.php -> PHP Include files (these are all files containing
content to be included in Normal files)
filename.class.php -> PHP Class files (these are my class files)
filename.lib.php -> PHP Library files (these are function libraries)

This allows PHPDoc to pick up the correct files as well as prevents people
from viewing the source code of my files. The only files that print content
directly to STDOUT are filename.php and filename.inc.php. The other two file
extensions, filename.class.php and filename.lib.php, only contain functions,
classes, variable declarations, etc.

--Toby

- Original Message -
From: "Johnson, Kirk" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 30, 2001 6:22 PM
Subject: RE: [PHP] Please review our coding standards [ ideas ]


> Steve, I am wondering what your reason is for item 4.2. Security, or
> otherwise? Personally, I like having various file extensions, for sorting
> files by content type.
>
> Thanks for putting this up here.
>
> Kirk
>
> > -Original Message-
> > From: Steven Haryanto [mailto:[EMAIL PROTECTED]]
> > Subject: [PHP] Please review our coding standards [ ideas ]
>
> > 4. File organization
> > 
>
> > 4.2 All PHP libraries and include files, is named with '.php'
> > extension (ie.
> >  no '.lib', '.inc', etc.). Test scripts is named with
> > '.phpt' extension.
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] forcing upload instead of showing doc

2001-05-08 Thread Toby Miller

I use this code:

header("Content-Type: $filetype");
header("Content-Disposition: atachment; filename=$showfilename");
header("Content-Length: $filesize");
readfile($source);

Note the mispelling of "atachment". This seems wrong but is actually the
correct spelling for IE, Netscape doesn't seem to mind either way.

--Toby

- Original Message -
From: "Wieger Uffink" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, May 08, 2001 12:07 PM
Subject: Re: [PHP] forcing upload instead of showing doc


> Hi,
>
>
>  header("Content-Type: application/octet-stream");
> header("Content-Disposition: attachment; filename=name.doc");
> include("file.doc");
> ?>
>
> Wieger
>
> Christian Dechery wrote:
> >
> > How do I force an output to be recognized by the browser by a
downloadable
> > text file as soon as I press the submit button?
> >
> > what header(*) stuff should I add before echo-ing stuff?
> >
> > thanks
> >
> > . [ Christian Dechery  ]
> > . Webdeveloper @ Tá Na Mesa!
> > . Listmaster @ Gaita-L
> > . http://www.tanamesa.com.br
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
> --
> Wieger Uffink
> tel: +31 20 428 6868
> fax: +31 20 470 6905
> web: http://www.usmedia.nl
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] multiselects and arrays

2001-05-10 Thread Toby Miller

You can use javascript with this naming convention, just not the way you're
probably doing it. Here's a working example:









function getValue(field)
{
var form = document.testform;
var temp = form[field].value;
return(temp);
}

function getArrayValue(field, index)
{
var form = document.testform;
var temp = new Array();
var type = form.type;

for (i=0; i= index)
{
return(temp[index]);
}
else
{
return(false);
}
}

function test()
{
test_0 = getValue("test[0]");
test_1 = getValue("test[1]");
test_2 = getValue("test[2]");

test2_0 = getArrayValue("test2[]", 0);
test2_1 = getArrayValue("test2[]", 1);

alert(
"test_0 = " + test_0 + "\n" +
"test_1 = " + test_1 + "\n" +
"test_2 = " + test_2 + "\n" +
"test2_0 = " + test2_0 + "\n" +
"test2_1 = " + test2_1 + "\n"
);
}






test[0]



test[1]



test[2]



test2[]



test2[]











Hope this helps.

--Toby



- Original Message -
From: "Max Vysotskiy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 10, 2001 11:06 AM
Subject: [PHP] multiselects and arrays


> Hi.
> Why doesn't PHP convert mutiselect values with plain names (not
array-like)
> to arrays. Is there any reason to not doing this?
>
> Example:
> I have a page with multiselect, which name is SEL1
> (I cannot use square brackets because I need to use a JavaScript on the
> page, so, it's not allowed in variable names to contain [ ]  ). When
browser
> submits this page, and if there are sew values selected in this
multiselect,
> it just sends this values along to each other with same name.
> (such as in case of GET method:
http://somehost.com/index.php?SEL1=1&SEL2=2)
> So, why not parse this, and in case if there are more than one variable
with
> same name, convert this variable to array, and put all the values there?
> Thanx
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] $DOCUMENT_ROOT

2001-01-29 Thread Toby Miller

Whenever I include files in Apache I always do it like this:

include($DOCUMENT_ROOT."/folder/file.php");

However, now I am doing a site in IIS and I do not have $DOCUMENT_ROOT at my disposal. 
What do most of you usually do to workaround this? Aside from installing Apache and 
Linux and bypassing the whole Windows thing :)

Thanks,
Toby




Re: [PHP] neat html output

2001-01-31 Thread Toby Miller

Mark,

The closest way that I know of to accomplish this is to print them more like
you would HTML. So in other words, you can do this:



$title


$content


';

?>

or like this:










The only way around these methods that I've seen are using template wrapper
objects and creating the whole thing that way.

Toby
- Original Message -
From: "Joe Sheble (Wizaerd)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 9:49 AM
Subject: Re: [PHP] neat html output


> oops, that function declaration should look like:
>
> function println( $cTextToPrint ) {
>  print( $cTextToPrint . chr(13) );
> }
>
>
> At 07:40 AM 1/31/01 -0700, Joe Sheble (Wizaerd) wrote:
>
> >Write yourself a function that handles it yourself and include it in
every
> >page... something such as:
> >
> >function println( $cTextToPrint ) {
> > print( $cTextToPrint . "" );
> >}
> >
> >then in your pages just use println() everywhere...
> >
> >At 08:29 AM 1/31/01 -0600, Mark wrote:
> >>I'd like my html output to be neatly written, including newlines is
helpful
> >>but does anyone know of a better way to output newlines than appending
> >>."\n"; to every echo statement.
> >>
> >>-Mark
> >>
> >>
> >>
> >>
> >>--
> >>PHP General Mailing List (http://www.php.net/)
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Tab character

2001-02-01 Thread Toby Miller

Yes, and here are others which came from the following URL:
http://www.php.net/manual/en/pcre.pattern.syntax.php

\a = alarm, that is, the BEL character (hex 07)
\cx = "control-x", where x is any character
\e = escape (hex 1B)
\f = formfeed (hex 0C)
\n = newline (hex 0A)
\r = carriage return (hex 0D)
\t = tab (hex 09)
\xhh = character with hex code hh
\ddd = character with octal code ddd, or backreference

-Toby

- Original Message - 
From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, February 01, 2001 10:17 AM
Subject: [PHP] Tab character


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


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




[PHP] Off Subject, but can't find any info elsewhere

2001-02-02 Thread Toby Miller

Web Developers,

I know this has nothing to do with PHP, but some bright minds out there might have run 
across it. It's about Netscape 6 mouseovers.

I've read elsewhere that Netscape 6 has problems with preloading images. I have 
confirmed this time and time again, but have not been able to come to any viable 
solutions. Nor have I been able to find a posted solution or a documented workaround 
anywhere on the web. Has anyone here found a workaround for this bug that will prevent 
Netscape from causing mouseover images (which were preloaded) to stop disappearing 
from the screen when you roll over them too quickly. They aren't just made invisible, 
they are actually gone.

I'm fine with the new DOM as it makes sense to start complying to the standards, it 
needs to be done. However, mouseovers are one of the most basic features of JavaScript 
that every site on the web uses so there really should be a way to successfully code 
mouseovers into a web page without worrying about them disappearing. Talk about a web 
site navigation nightmare.

I have like mostly everything about Netscape 6 except this little "feature" and I'm 
about to give up on the browser because of it. If anyone has found a way around this I 
would really appreciate knowing how you dealt with it.

Thanks,
Toby




[PHP] Multi-Dimensional Array Problems

2001-02-03 Thread Toby Miller

Hey all,

I've got this user authentication class that grabs a users profile from the database. 
Anyhow, I need to also insert the groups that this user belongs to along with 
permission settings. I'm having trouble figuring out how to store and read back the 
data. I'm using PHP4. Here's the code:

// Grab the list of groups that this user belongs to
$sql = 'select groupname,a,r,w,d from auth_usergroups where username = "' . $u . '"';
$AUTHSQL .= $sql . '';
$query = mysql_query($sql);

if (mysql_error() != "") {
 $AUTHMSG .= mysql_error() . "";
}

if (mysql_num_rows($query) > 0) {
 $counter = 0;
 $this->group = array();
 while ($rs = mysql_fetch_array($query)) {
  $this->group[$counter] = array(
   "name" => $rs[groupname],
   "a" => $rs[a],
   "r" => $rs[r],
   "w" => $rs[w],
   "d" => $rs[d]
  );
  $counter++;
 }
 mysql_free_result($query);
}

I've tried this in a few different ways and everytime I end up with blank values or 
I'm just not calling them correctly. Can anyone give me a few pointers as to how you 
would go about this? By the way, this is inside the classes initialization function so 
there are other properties like $this->username, $this->firstname, etc. That's why I 
need this to be a multidimensional array.

Thanks,
Toby




[PHP] MSSQL Functions

2001-02-07 Thread Toby Miller

Hey all,

I've got a question about using the MSSQL Functions. The only way I've been able to 
use them is to install Microsoft SQL Client on the web server. Is there any way to get 
around this to use the MSSQL Functions without installing a copy of Microsoft SQL 
Client? Right now I am using the ODBC Functions to get around the problem, but I was 
wondering if it just relies on some DLL's that I could copy to the server or something 
like that? I know that people are using the MSSQL Functions on Linux and they 
obviously didn't need to install Microsoft SQL Client to get them to work so I'm just 
hoping there's a way around it?

Thanks,
Toby




[PHP] Re: [PHP-WIN] Re: [PHP] RE: [PHP-WIN] MSSQL Functions

2001-02-08 Thread Toby Miller

Frank,

That worked like a charm. I just copied the ntwdblib.dll that comes with the
PHP 4 binaries to the Winnt/System32 directory so the MSSQL functions are
now working on a machine without the need to install MSSQL Server or Client.
You just saved me from having to do a whole web site with the ODBC
functions.

Thanks a lot,
Toby


- Original Message -
From: "Frank M. Kromann" <[EMAIL PROTECTED]>
To: "Flint Doungchak" <[EMAIL PROTECTED]>
Cc: "'Toby Miller'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, February 07, 2001 7:29 PM
Subject: [PHP-WIN] Re: [PHP] RE: [PHP-WIN] MSSQL Functions


> Hi All,the key komponent is ntwdblib.dll installed in winnt\system32. The
dll uses other dll's to comunicate with the server dbmssocn.dll (tcp/ip) and
dbmsnp.dll (NetBios). All the communication dll's should be installed with
the ODBC driver. Just copy ntwdblib.dll from the SQL server to the php
server.You will need to use the ODBC manager to create client configurations
as the tools for this will not be installed.- Frank>Toby,>>Yes, the client
is requires because the MSSQL module uses some libraries>from the client to
function. I don't know which one. If Frank see this, he>might be able to
give you some detailed insight. I just know it has to
be>installed.>>-Flint>>-Original Message->From: Toby Miller
[mailto:[EMAIL PROTECTED]]>Sent: Wednesday, February 07, 2001 4:04 PM>To:
[EMAIL PROTECTED]; [EMAIL PROTECTED]>Subject: [PHP-WIN]
MSSQL Functions>>>Hey all,>>I've got a question about using the MSSQL
Functions. The only way I'v!
> e been>able to use them is to install Microsoft SQL Client on the web
server. Is>there any way to get around this to use the MSSQL Functions
without>installing a copy of Microsoft SQL Client? Right now I am using the
ODBC>Functions to get around the problem, but I was wondering if it just
relies>on some DLL's that I could copy to the server or something like that?
I know>that people are using the MSSQL Functions on Linux and they obviously
didn't>need to install Microsoft SQL Client to get them to work so I'm just
hoping>there's a way around it?>>Thanks,>Toby>>>-- >PHP General Mailing List
(http://www.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 Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





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




[PHP] HTTP Authentication not getting unset

2001-02-14 Thread Toby Miller

Hey all,

New problem. I really hope there's something simple to do to fix it. Check out this 
scenario and tell me if there's a step that I'm missing.

Inside my common footer on my site the very first call is to an include called 
UserAuth.inc.php.

UserAuth.inc.php checks $REQUEST_URI to see if the present directory or URL is 
protected or not.

If it is protected then it checks to see if $PHP_AUTH_USER is set. If it is then it 
runs through the usual HTTP Authentication. If it fails it goes to a failure page, if 
it succeeds then it logs the user in.

Now I can surf around on the site and that same authentication will continue to be 
used for the rest of the site where ever another protected directory or file is found 
(as to be expected).

Now to logout I have a page called logout.php. If you go to this page (which also 
includes the same footer) there is another action that takes place.

If the $REQUEST_URI contains logout.php then I print the same "401" header that I 
print for authentication and unset $PHP_AUTH_USER, $PHP_AUTH_PW and $AUTH_USER. 
$AUTH_USER is the user authentication object in my class file UserAuth.class.php. I'm 
just unsetting this so that no code will still have record of the old authentication 
object to do anything with.

Now if I try to read the $PHP_AUTH_USER or $PHP_AUTH_PW variables anyplace on the site 
they don't exist, until I go back to one of the protected pages. Then they 
miraculously re-appear and are readily available once again without requiring the user 
to log back in.

If you've got any ideas, suggestions, guesses or references, please reply. I've run 
out of ideas. I can also provide the code that I'm using if you think it might just be 
a problem with my logic. I don't think this is the case as I shouldn't be able to read 
any variable that has been unset, but like I said, I'm running out of ideas.

System: RedHat 6.1-6 i686 Kernel 2.2.13
Server: Apache 1.3.12
PHP: 4.0.3pl1

Thanks,
Toby




Re: [PHP] HTTP Authentication not getting unset

2001-02-14 Thread Toby Miller

Sorry, I meant common header, not footer.

Inside my common "header" on my site ..
(which also includes the same "header") ...

- Original Message -
From: "Toby Miller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 2001 10:37 AM
Subject: [PHP] HTTP Authentication not getting unset


Hey all,

New problem. I really hope there's something simple to do to fix it. Check
out this scenario and tell me if there's a step that I'm missing.

Inside my common footer on my site the very first call is to an include
called UserAuth.inc.php.

UserAuth.inc.php checks $REQUEST_URI to see if the present directory or URL
is protected or not.

If it is protected then it checks to see if $PHP_AUTH_USER is set. If it is
then it runs through the usual HTTP Authentication. If it fails it goes to a
failure page, if it succeeds then it logs the user in.

Now I can surf around on the site and that same authentication will continue
to be used for the rest of the site where ever another protected directory
or file is found (as to be expected).

Now to logout I have a page called logout.php. If you go to this page (which
also includes the same footer) there is another action that takes place.

If the $REQUEST_URI contains logout.php then I print the same "401" header
that I print for authentication and unset $PHP_AUTH_USER, $PHP_AUTH_PW and
$AUTH_USER. $AUTH_USER is the user authentication object in my class file
UserAuth.class.php. I'm just unsetting this so that no code will still have
record of the old authentication object to do anything with.

Now if I try to read the $PHP_AUTH_USER or $PHP_AUTH_PW variables anyplace
on the site they don't exist, until I go back to one of the protected pages.
Then they miraculously re-appear and are readily available once again
without requiring the user to log back in.

If you've got any ideas, suggestions, guesses or references, please reply.
I've run out of ideas. I can also provide the code that I'm using if you
think it might just be a problem with my logic. I don't think this is the
case as I shouldn't be able to read any variable that has been unset, but
like I said, I'm running out of ideas.

System: RedHat 6.1-6 i686 Kernel 2.2.13
Server: Apache 1.3.12
PHP: 4.0.3pl1

Thanks,
Toby




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




Re: [PHP] HTTP Authentication not getting unset

2001-02-14 Thread Toby Miller

Chris,

I was afraid of that. I do have a contingency plan that is very similar to what you 
suggested. Since this is all already interacting with the database I'm just going to 
set a timestamp in the database in that users record and use that to determine if 
someone is logged in or not. This would also give me the added benefit of expiring 
sessions after a set period of inactivity. Then the login will require that 
PHP_AUTH_USER, PHP_AUTH_PW, and the session timestamp are all valid. This should take 
care of the problem.

Unfortunately, the back button will still allow users to see cached pages from logged 
in sessions, but I guess you can't have everything. :-)

Thanks,
Toby


- Original Message - 
From: "Chris Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, February 14, 2001 11:44 AM
Subject: Re: [PHP] HTTP Authentication not getting unset


> Ive found the same thing and currently do not have a workaround, it seems
> that browsers cache this. one method Ive thought of and never tested is to
> set a session variable, cross reference that SessionID, PHP_AUTH_PW,
> PHP_AUTH_USER are all valid, if not then your not loged in correctly. to log
> out just unset SessionID. any future pages will not load. even if the
> PW/USER are valid the Session wouldnt.
> 
> If the browser has cookies disabled, you have compiled php with --trans-sid,
> and the user uses the back button the user would still be able to view
> cached pages. you might want to put some fancy no-cache headers in there
> somewhere and hope the browser supports them.
> 
> you might even want to impliment a time based system, set the SessionID =
> time() on every header; but first check if the current SessionID < 30min old
> then invalid login vs updateing SessionID to equal current time()
> 
> This would prevent anyone from viewing cached pages more then 30min old and
> force them to re-login
> 
> --
> 
> 
> Chris Lee
> Mediawaveonline.com
> 
> em. [EMAIL PROTECTED]
> 
> ph. 250.377.1095
> ph. 250.376.2690
> fx. 250.554.1120
> 
> 
> 
> 
> 
> ""Toby Miller"" <[EMAIL PROTECTED]> wrote in message
> 006901c0969f$cfcf2700$[EMAIL PROTECTED]">news:006901c0969f$cfcf2700$[EMAIL PROTECTED]...
> > Sorry, I meant common header, not footer.
> >
> > Inside my common "header" on my site ..
> > (which also includes the same "header") ...
> >
> > - Original Message -
> > From: "Toby Miller" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, February 14, 2001 10:37 AM
> > Subject: [PHP] HTTP Authentication not getting unset
> >
> >
> > Hey all,
> >
> > New problem. I really hope there's something simple to do to fix it. Check
> > out this scenario and tell me if there's a step that I'm missing.
> >
> > Inside my common footer on my site the very first call is to an include
> > called UserAuth.inc.php.
> >
> > UserAuth.inc.php checks $REQUEST_URI to see if the present directory or
> URL
> > is protected or not.
> >
> > If it is protected then it checks to see if $PHP_AUTH_USER is set. If it
> is
> > then it runs through the usual HTTP Authentication. If it fails it goes to
> a
> > failure page, if it succeeds then it logs the user in.
> >
> > Now I can surf around on the site and that same authentication will
> continue
> > to be used for the rest of the site where ever another protected directory
> > or file is found (as to be expected).
> >
> > Now to logout I have a page called logout.php. If you go to this page
> (which
> > also includes the same footer) there is another action that takes place.
> >
> > If the $REQUEST_URI contains logout.php then I print the same "401" header
> > that I print for authentication and unset $PHP_AUTH_USER, $PHP_AUTH_PW and
> > $AUTH_USER. $AUTH_USER is the user authentication object in my class file
> > UserAuth.class.php. I'm just unsetting this so that no code will still
> have
> > record of the old authentication object to do anything with.
> >
> > Now if I try to read the $PHP_AUTH_USER or $PHP_AUTH_PW variables anyplace
> > on the site they don't exist, until I go back to one of the protected
> pages.
> > Then they miraculously re-appear and are readily available once again
> > without requiring the user to log back in.
> >
> > If you've got any ideas, suggestions, guesses or references, please reply.
> > I've run out of ideas. I can also provide the code that I'm using if you
> > thin