Re: [PHP] Does this seem odd? File Upload Permissions

2002-03-26 Thread Jason Wong

On Wednesday 27 March 2002 15:33, David McInnis wrote:
> OK.  But I am not changing the permissions.  How am I setting the x bit?
> I am not doing anything in my code except executing a copy() or
> move_uploaded_file(). Is my server not configured correctly?  If so, how
> do I change the default permissions?
>
> By the way, move_uploaded_file() sets completely different permissions
> [-rw---]than copy() [rwxr-xr-x].  I still say . . . "strange".

Have a look at the umask() function.

If that doesn't solve your problem you can always explicitly set the 
permissions after moving/copying using chmod().
-- 


Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
If you lived today as if it were your last, you'd buy up a box of rockets
and fire them all off, wouldn't you?
-- Garrison Keillor
*/

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




Re: [PHP] Loading Images

2002-03-26 Thread Oliver Heinisch

At 26.03.2002  14:44, you wrote:
>I wasn't so much concearned about security of users grabbin pics. I am
>more trying to learn how these people load there menus dynamically and
>pics dynamically. Do you have any links to pages or code that describe how
>to make a link in the db to pics on my filesystem?
>Thanks.
>-Chris


I cannot help you with code,also it wouldn´t really help you understanding 
the problem
but give you more problems understanding my code.
I use to have a table with the following structure
TABLE MENU
rn  // that´s an autoincrement number for indexing
page // on which page the component will appear "foobar.php3"
pt  // path to the pic (depending of quantity of path) "../pix/"
nop // the name of the pic "foo.jpg"
altval  // the word which will be shown in the alt tag of the pics 
reference "This is the foopic"
link// where will the link go "newfoo.php"
orm // a number to order the
sf  // showflag, to switch off unwanted/uncompleted pages

For pathinformations, I use an includefile which is included on every page.
This holds the informations about tablewidth, pathes(oops that´s correct?), 
sitenames
and everything the Site needs on every page.

Now you just make a select like
select * from menu where page="$PHP_SELF" where sf=1 order by orm
And make your menu. If you put the menu in an extra page (or an object)
you just have to include it on every "content page" and the work is done.
echo ''
while($res=answer from db)
{
 echo ''
 echo ''
 echo '
 echo ''
}
echo ''

As you said you want to make a menu, width & height of the pics are known.
Otherwise you shoul check them using fuctions from the graphic library.
The Browsers are faster if they know exactly what the do.
Maybe this gives you some understanding how to do it.
Oliver
(sorry all trailing ; are missing. It´s early today)


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




Re: [PHP] Getting QUALITY text on an image

2002-03-26 Thread Miguel Cruz

I can't imagine you'll ever get results that are to anyone's satisfaction
using JPEGs unless they aren't wearing their glasses. How about PDF? 

miguel

On Tue, 26 Mar 2002, Michael A. Peters wrote:

> Here's the situation.
> 
> I run the website for a macintosh user folding@home team.
> 
> We are providing certificates for users who have done a signifigant amount
> of work for the team.
> 
> I have jpeg templates and I'm using ImageTTFBBox and ImageTTFText to write
> the username of the user on the certificate.
> 
> Some of the more "artistic" mac users have noticed some pixelation on the
> text.
> I'm looking for a way to clean that up.
> 
> Is there a way to use Postscript fonts with php?
> I looked at the ImageMagik php extension, and it looks like it is still
> quite early in development.
> 
> I haven't used ImageMagik much, but would an exec() call to the real
> ImageMagick and then have php display what it does be a solution to this?
> (yes- I know exec() isn't as good as pure php but hey-)
> 
> If you want to see it for yourself, look at the images produced by the
> usernames with links at http://macaddict4life.dhs.org/walloffame.php
> 
> The source to the image generation is at
> http://macaddict4life.dhs.org/Certs/certificate.phps
> 
> I'm currently using php 4.1.2 with GD-2 and FreeType 2 support (x86 Linux
> Apache DSO)
> 
> -=-=-=-=-=-=-=-=-
> Different matter, is there a way to pass the username to the php script
> from a hyperlink w/o needing a ?name=blah in the link?
> 
> It would be cool if the script could just end in .jpeg opposed to
> .jpeg?name=blah
> (in that directory apache handled .jpeg as if it was .php)
> 
> Thanks for any suggestions!
> 
> 


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




[PHP] Trans_sid

2002-03-26 Thread Richard Baskett

Is there any other way of enabling trans_sid besides when compiling php?
Can I enable it in the php.ini file or .htaccess? And if so what would the
syntax be?  I've tried multiple things, but nothing seems to work..

If that's not possible is there a way of getting rid of the '?' in the url
when people have cookies enabled?  When cookies are not enabled the sid will
follow the '?' in the url since currently all my links have  at the
end.. So for example:

Please login

As you can see there will always be the '?' at the end of login.htm.. When
the surfer has cookies off it doesn¹t look bad, but when he has them
enabled.. It just looks strange :)

Thanks!

Rick

"A good head and good heart are always a formidable combination. But when
you add to that a literate tongue or pen, then you have something very
special" - Nelson Mandela


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




[PHP] Getting QUALITY text on an image

2002-03-26 Thread Michael A. Peters

Here's the situation.

I run the website for a macintosh user folding@home team.

We are providing certificates for users who have done a signifigant amount
of work for the team.

I have jpeg templates and I'm using ImageTTFBBox and ImageTTFText to write
the username of the user on the certificate.

Some of the more "artistic" mac users have noticed some pixelation on the
text.
I'm looking for a way to clean that up.

Is there a way to use Postscript fonts with php?
I looked at the ImageMagik php extension, and it looks like it is still
quite early in development.

I haven't used ImageMagik much, but would an exec() call to the real
ImageMagick and then have php display what it does be a solution to this?
(yes- I know exec() isn't as good as pure php but hey-)

If you want to see it for yourself, look at the images produced by the
usernames with links at http://macaddict4life.dhs.org/walloffame.php

The source to the image generation is at
http://macaddict4life.dhs.org/Certs/certificate.phps

I'm currently using php 4.1.2 with GD-2 and FreeType 2 support (x86 Linux
Apache DSO)

-=-=-=-=-=-=-=-=-
Different matter, is there a way to pass the username to the php script
from a hyperlink w/o needing a ?name=blah in the link?

It would be cool if the script could just end in .jpeg opposed to
.jpeg?name=blah
(in that directory apache handled .jpeg as if it was .php)

Thanks for any suggestions!

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




RE: [PHP] Does this seem odd? File Upload Permissions

2002-03-26 Thread David McInnis

OK.  But I am not changing the permissions.  How am I setting the x bit?
I am not doing anything in my code except executing a copy() or
move_uploaded_file(). Is my server not configured correctly?  If so, how
do I change the default permissions?  

By the way, move_uploaded_file() sets completely different permissions
[-rw---]than copy() [rwxr-xr-x].  I still say . . . "strange".

David



-Original Message-
From: Demitrious S. Kelly [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 26, 2002 11:24 PM
To: 'Rasmus Lerdorf'
Cc: 'David McInnis'; [EMAIL PROTECTED]
Subject: RE: [PHP] Does this seem odd? File Upload Permissions

Either severely mis-configure, or make a mistake (damn us humans and our
mistakes :)

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 26, 2002 11:15 PM
To: Demitrious S. Kelly
Cc: 'David McInnis'; [EMAIL PROTECTED]
Subject: RE: [PHP] Does this seem odd? File Upload Permissions

But it would mean that you would have to severly misconfigure your
server
and write severely braindead code.  Simply putting a file in your
document_root that has the x bit set will under normal circumstances not
do anything.

On Tue, 26 Mar 2002, Demitrious S. Kelly wrote:

> That's not entirely true... if php is running as cgi it would need the
> execution bit set. Or if someone wanted to write a shell script in php
> to be used to help compromise a server it would need to be executable
as
> well...
>
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 11:08 PM
> To: David McInnis
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Does this seem odd? File Upload Permissions
>
> First, the execute bit means nothing over HTTP.  So they couldn't just
> execute it remotely.  They would need an account on the box.
>
> And second, PHP does not set the x bit, you are doing that.  Check
your
> default umask or set it explicitly with a call to umask() before
copying
> the file into place.
>
>
> On Tue, 26 Mar 2002, David McInnis wrote:
>
> > Why does PHP set the execute bit on an uploaded file?  This means a
> user
> > could upload a script and it would be executable.  Ouch!  Especially
> if
> > the file is available via httpd after upload. . . HELP.
> >
> > I am saving to a directory with permissions of 766
> >
> > And when php copies the file it assigns the following permissions.
> >
> > rwxr-xr-x
> >
> > I am using the copy command to move the file from the tmp directory.
> >
> > David McInnis
> >
> >
> >
> >
> > --
> > 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



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




Re: [PHP] How to get user full name using PHP function?

2002-03-26 Thread Miguel Cruz

On Wed, 27 Mar 2002, gaukia 345 wrote:
> I'm writing a web mail. Having problem grabbing user full name to be 
> included in the email. So I hv a few questions:
> 
> 1) How do I fetch the user's full name using a PHP function WITHOUT
> calling system program finger? I already have the Linux user ID and
> password since I am using HTTP authentication.

Check out the function posix_getpwnam(), in particular, the gecos field. 
This obviously only works if the user account is present on your web 
server.

> 2) How do I fetch it using finger?

I wouldn't if I were you.

> 3) Do I put the full name in the from->personal variable?

Difficult to say. What is the from->personal variable?

miguel


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




RE: [PHP] Does this seem odd? File Upload Permissions

2002-03-26 Thread Demitrious S. Kelly

Either severely mis-configure, or make a mistake (damn us humans and our
mistakes :)

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 26, 2002 11:15 PM
To: Demitrious S. Kelly
Cc: 'David McInnis'; [EMAIL PROTECTED]
Subject: RE: [PHP] Does this seem odd? File Upload Permissions

But it would mean that you would have to severly misconfigure your
server
and write severely braindead code.  Simply putting a file in your
document_root that has the x bit set will under normal circumstances not
do anything.

On Tue, 26 Mar 2002, Demitrious S. Kelly wrote:

> That's not entirely true... if php is running as cgi it would need the
> execution bit set. Or if someone wanted to write a shell script in php
> to be used to help compromise a server it would need to be executable
as
> well...
>
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 11:08 PM
> To: David McInnis
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Does this seem odd? File Upload Permissions
>
> First, the execute bit means nothing over HTTP.  So they couldn't just
> execute it remotely.  They would need an account on the box.
>
> And second, PHP does not set the x bit, you are doing that.  Check
your
> default umask or set it explicitly with a call to umask() before
copying
> the file into place.
>
>
> On Tue, 26 Mar 2002, David McInnis wrote:
>
> > Why does PHP set the execute bit on an uploaded file?  This means a
> user
> > could upload a script and it would be executable.  Ouch!  Especially
> if
> > the file is available via httpd after upload. . . HELP.
> >
> > I am saving to a directory with permissions of 766
> >
> > And when php copies the file it assigns the following permissions.
> >
> > rwxr-xr-x
> >
> > I am using the copy command to move the file from the tmp directory.
> >
> > David McInnis
> >
> >
> >
> >
> > --
> > 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] Does this seem odd? File Upload Permissions

2002-03-26 Thread Rasmus Lerdorf

But it would mean that you would have to severly misconfigure your server
and write severely braindead code.  Simply putting a file in your
document_root that has the x bit set will under normal circumstances not
do anything.

On Tue, 26 Mar 2002, Demitrious S. Kelly wrote:

> That's not entirely true... if php is running as cgi it would need the
> execution bit set. Or if someone wanted to write a shell script in php
> to be used to help compromise a server it would need to be executable as
> well...
>
> -Original Message-
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 11:08 PM
> To: David McInnis
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Does this seem odd? File Upload Permissions
>
> First, the execute bit means nothing over HTTP.  So they couldn't just
> execute it remotely.  They would need an account on the box.
>
> And second, PHP does not set the x bit, you are doing that.  Check your
> default umask or set it explicitly with a call to umask() before copying
> the file into place.
>
>
> On Tue, 26 Mar 2002, David McInnis wrote:
>
> > Why does PHP set the execute bit on an uploaded file?  This means a
> user
> > could upload a script and it would be executable.  Ouch!  Especially
> if
> > the file is available via httpd after upload. . . HELP.
> >
> > I am saving to a directory with permissions of 766
> >
> > And when php copies the file it assigns the following permissions.
> >
> > rwxr-xr-x
> >
> > I am using the copy command to move the file from the tmp directory.
> >
> > David McInnis
> >
> >
> >
> >
> > --
> > 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] Does this seem odd? File Upload Permissions

2002-03-26 Thread Demitrious S. Kelly

That's not entirely true... if php is running as cgi it would need the
execution bit set. Or if someone wanted to write a shell script in php
to be used to help compromise a server it would need to be executable as
well...

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 26, 2002 11:08 PM
To: David McInnis
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Does this seem odd? File Upload Permissions

First, the execute bit means nothing over HTTP.  So they couldn't just
execute it remotely.  They would need an account on the box.

And second, PHP does not set the x bit, you are doing that.  Check your
default umask or set it explicitly with a call to umask() before copying
the file into place.


On Tue, 26 Mar 2002, David McInnis wrote:

> Why does PHP set the execute bit on an uploaded file?  This means a
user
> could upload a script and it would be executable.  Ouch!  Especially
if
> the file is available via httpd after upload. . . HELP.
>
> I am saving to a directory with permissions of 766
>
> And when php copies the file it assigns the following permissions.
>
>   rwxr-xr-x
>
> I am using the copy command to move the file from the tmp directory.
>
> David McInnis
>
>
>
>
> --
> 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] Does this seem odd? File Upload Permissions

2002-03-26 Thread Rasmus Lerdorf

First, the execute bit means nothing over HTTP.  So they couldn't just
execute it remotely.  They would need an account on the box.

And second, PHP does not set the x bit, you are doing that.  Check your
default umask or set it explicitly with a call to umask() before copying
the file into place.


On Tue, 26 Mar 2002, David McInnis wrote:

> Why does PHP set the execute bit on an uploaded file?  This means a user
> could upload a script and it would be executable.  Ouch!  Especially if
> the file is available via httpd after upload. . . HELP.
>
> I am saving to a directory with permissions of 766
>
> And when php copies the file it assigns the following permissions.
>
>   rwxr-xr-x
>
> I am using the copy command to move the file from the tmp directory.
>
> David McInnis
>
>
>
>
> --
> 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] Does this seem odd? File Upload Permissions

2002-03-26 Thread Demitrious S. Kelly

The default file permission for new files on the *nix system may be set
to something like 755... that could be the problem...

-Original Message-
From: David McInnis [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 26, 2002 11:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Does this seem odd? File Upload Permissions

Why does PHP set the execute bit on an uploaded file?  This means a user
could upload a script and it would be executable.  Ouch!  Especially if
the file is available via httpd after upload. . . HELP.

I am saving to a directory with permissions of 766

And when php copies the file it assigns the following permissions.  

rwxr-xr-x  

I am using the copy command to move the file from the tmp directory.

David McInnis




-- 
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] Does this seem odd? File Upload Permissions

2002-03-26 Thread David McInnis

Why does PHP set the execute bit on an uploaded file?  This means a user
could upload a script and it would be executable.  Ouch!  Especially if
the file is available via httpd after upload. . . HELP.

I am saving to a directory with permissions of 766

And when php copies the file it assigns the following permissions.  

rwxr-xr-x  

I am using the copy command to move the file from the tmp directory.

David McInnis




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




Re: [PHP] How to get user full name using PHP function?

2002-03-26 Thread Jason Wong

On Wednesday 27 March 2002 14:44, gaukia 345 wrote:
> Hi all,
>
> I'm writing a web mail. Having problem grabbing user full name to be
> included in the email. So I hv a few questions:
>
> 1) How do I fetch the user's full name using a PHP function WITHOUT calling
> system program finger? I already have the Linux user ID and password since
> I am using HTTP authentication.
>
> 2) How do I fetch it using finger?
>
> 3) Do I put the full name in the from->personal variable?

Where did you want to get the user's full name from !?!

Assuming the people using your webmail have system accounts on the machine 
running your webmail then you could try looking in /etc/passwd.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
politics, n.:
A strife of interests masquerading as a contest of principles.
The conduct of public affairs for private advantage.
-- Ambrose Bierce
*/

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




[PHP] How to get user full name using PHP function?

2002-03-26 Thread gaukia 345

Hi all,

I'm writing a web mail. Having problem grabbing user full name to be 
included in the email. So I hv a few questions:

1) How do I fetch the user's full name using a PHP function WITHOUT calling 
system program finger? I already have the Linux user ID and password since I 
am using HTTP authentication.

2) How do I fetch it using finger?

3) Do I put the full name in the from->personal variable?

Thanx

Gaukia


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's locationtag?

2002-03-26 Thread Justin French

Seems like you're getting confused about output verses php code.  Let's say
you have a file called "form.php"...

it submits to itself, checking the submitted data.  if the form input is
good, you want to do "stuff", then redirect them to a thanks page.  if it
isn't, you want to send them back to try again.

Easy.

form.php
---








Thanks!



---

So, obviously it needs massaging, and none of the code is tested, but it's
the same way I do my forms.

It'd be better if you told them where they went wrong on the form, and there
are lots of ways to streamline the code and make it more modular, but this
should be enough to give you an idea about how you can use the header(), and
at what point you've sent "output" to the browser.


Justin French

Creative Director
http://Indent.com.au



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




Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's locationtag?

2002-03-26 Thread Rasmus Lerdorf

> Hi Mr. Lerdorf,
> I look forward to you upcoming O'Reilly PHP book. =)
>
> Yes, a META tag refresh or Javascript control seems to be the only way left.
> Strange that URL redirection is so unusual to implement in PHP compared to
> ASP or Coldfusion (unless they do something klunky under the hood).

They do. There is no magic here. If you want output on a page and also do
a redirect, the only way to do it is with a javascript meta-refresh (well,
you can do some tricks with frames as well, but I lump those tricks under
Javascript redirects). I don't care what ASP of Cold Fusion tells you, if
they allow you to send some data for the page and then redirect, then they
are either doing a Javascript meta-refresh or simply tossing your data and
doing a Location redirect.

If you have no output, then you can use a Location redirect.  What ASP and
Cond Fusion might do is buffer your output and simply throw it away if you
then at some point do a Location redirect.  That seems kind of silly to me
though.  It seems like a mistake to me to just chuck away output data like
that.  You can do that with PHP as well by turning on output buffering.
You can send all sorts of output after a Location redirect, but there will
be no browser around to see it because it has already received the
Location redirect and is off viewing the other page.

> Anyway, I also noticed that when the manual says you cannot output ANYTHING,
> I found out that if I close out all my spaces in the PHP page by tightening
> the php container tags, I will not output anything first.  I forgot that
> even whitespace would be considered a web page and would generate http
> headers (since the PHP processor probably translates whitespace as
> echo/print statements).

Yup, a space is as valid a character as any other.

-Rasmus

PS. One of the things with PHP is that we have never gone out of our way
to hide the actual mechanics of HTTP very much from the users.  I think it
is important for people to actually understand what is going on.  That's
why we don't have a redirect() function but instead tell you to send an
HTTP header called Location.  Because that is what needs to happen under
the covers.


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




RE: [PHP] Any PHP equivalent of Macromedia ColdFusion's location tag?

2002-03-26 Thread Jason Murray

Or, alter your page's structure so that it writes its output into a 
buffer, and echo/print it at the end of the page. That way you can
do the redirect at any point it's needed within the page logic.

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
"Work now, freak later!"

> -Original Message-
> From: webapprentice [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 27, 2002 4:25 PM
> To: Rasmus Lerdorf
> Cc: James; Jason Murray; [EMAIL PROTECTED]
> Subject: Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's
> location tag?
> 
> 
> Hi Mr. Lerdorf,
> I look forward to you upcoming O'Reilly PHP book. =)
> 
> Yes, a META tag refresh or Javascript control seems to be the 
> only way left.
> Strange that URL redirection is so unusual to implement in 
> PHP compared to
> ASP or Coldfusion (unless they do something klunky under the hood).
> 
> Anyway, I also noticed that when the manual says you cannot 
> output ANYTHING,
> I found out that if I close out all my spaces in the PHP page 
> by tightening
> the php container tags, I will not output anything first.  I 
> forgot that
> even whitespace would be considered a web page and would generate http
> headers (since the PHP processor probably translates whitespace as
> echo/print statements).
> 
> Thanks.
> 
> --Stephen
> 
> - Original Message -
> From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> To: "webapprentice" <[EMAIL PROTECTED]>
> Cc: "James" <[EMAIL PROTECTED]>; "Jason Murray"
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, March 27, 2002 12:01 AM
> Subject: Re: [PHP] Any PHP equivalent of Macromedia 
> ColdFusion's location
> tag?
> 
> 
> > So use a Javascript meta-refresh
> >
> > On Wed, 27 Mar 2002, webapprentice wrote:
> >
> > > Hi,
> > > Thanks for the reply.  I saw this as well in the mailing 
> list archives,
> but
> > > everyone is saying you cannot output ANYTHING before 
> calling header.
> > >
> > > Unfortunately, I'm calling this at the end of a process, 
> so it won't
> work.
> > > It tells me I've already sent out header information.
> > >
> > > I've basically created a single PHP page with a form.  
> When the form is
> > > submitted, it submits to itself.  It checks if the form 
> is submitted,
> and
> > > then goes to mail the contents to someone.  After 
> mailing, I want to go
> to a
> > > Thank You page.  I want to get away from this PHP page, 
> because I don't
> want
> > > a person refreshing the page and causing the PHP page to 
> submit again.
> > >
> > > Thus, is there something else I can do?  Or am I just not 
> seeing this?
> > >
> > > Thanks,
> > > Stephen
> > >
> > >
> > >
> > >
> > > - Original Message -
> > > From: "James" <[EMAIL PROTECTED]>
> > > To: "webapprentice" <[EMAIL PROTECTED]>
> > > Sent: Tuesday, March 26, 2002 10:20 PM
> > > Subject: Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's
> location
> > > tag?
> > >
> > >
> > > > header("Location: http://www.google.com";);
> > > > replace that url with the page you want it to go to
> > > >
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
> 

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




Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's location tag?

2002-03-26 Thread webapprentice

Hi Mr. Lerdorf,
I look forward to you upcoming O'Reilly PHP book. =)

Yes, a META tag refresh or Javascript control seems to be the only way left.
Strange that URL redirection is so unusual to implement in PHP compared to
ASP or Coldfusion (unless they do something klunky under the hood).

Anyway, I also noticed that when the manual says you cannot output ANYTHING,
I found out that if I close out all my spaces in the PHP page by tightening
the php container tags, I will not output anything first.  I forgot that
even whitespace would be considered a web page and would generate http
headers (since the PHP processor probably translates whitespace as
echo/print statements).

Thanks.

--Stephen

- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "webapprentice" <[EMAIL PROTECTED]>
Cc: "James" <[EMAIL PROTECTED]>; "Jason Murray"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 12:01 AM
Subject: Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's location
tag?


> So use a Javascript meta-refresh
>
> On Wed, 27 Mar 2002, webapprentice wrote:
>
> > Hi,
> > Thanks for the reply.  I saw this as well in the mailing list archives,
but
> > everyone is saying you cannot output ANYTHING before calling header.
> >
> > Unfortunately, I'm calling this at the end of a process, so it won't
work.
> > It tells me I've already sent out header information.
> >
> > I've basically created a single PHP page with a form.  When the form is
> > submitted, it submits to itself.  It checks if the form is submitted,
and
> > then goes to mail the contents to someone.  After mailing, I want to go
to a
> > Thank You page.  I want to get away from this PHP page, because I don't
want
> > a person refreshing the page and causing the PHP page to submit again.
> >
> > Thus, is there something else I can do?  Or am I just not seeing this?
> >
> > Thanks,
> > Stephen
> >
> >
> >
> >
> > - Original Message -
> > From: "James" <[EMAIL PROTECTED]>
> > To: "webapprentice" <[EMAIL PROTECTED]>
> > Sent: Tuesday, March 26, 2002 10:20 PM
> > Subject: Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's
location
> > tag?
> >
> >
> > > header("Location: http://www.google.com";);
> > > replace that url with the page you want it to go to
> > >
> > >
> >
> >
> > --
> > 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] Re: Code Bulk

2002-03-26 Thread Steve Clay

GS>  echo 'Finished';
?>>

I can do one better:

... ?>Finishedhttp://mrclay.org


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




[PHP] PDFlib error - pdf_color or pdf_setrgbcolor

2002-03-26 Thread Wayne Bastow

Hi,

I'm trying to fill a rectangle with color in a php generated PDF 
document.  I get the following error:

*Fatal error*: PDFlib error: illegal state 0x in 
*/usr/local/apache/htdocs/EDR/generate_edr.php* on line *144*

I have tried both of the following on line 144:

pdf_setcolor($pdf, "both", "gray", 1);

pdf_setrgbcolor($pdf,1,1,0);

If I comment out the line to set color the PDF document gets generated 
correctly. I can't find any reference* *to this error on mailing lists 
or documentation. I'm using PHP Version 4.1.1 and PDFlib 4.0.1.

Does anyone have any ideas, thanks.

Wayne Bastow




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




Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's locationtag?

2002-03-26 Thread Rasmus Lerdorf

So use a Javascript meta-refresh

On Wed, 27 Mar 2002, webapprentice wrote:

> Hi,
> Thanks for the reply.  I saw this as well in the mailing list archives, but
> everyone is saying you cannot output ANYTHING before calling header.
>
> Unfortunately, I'm calling this at the end of a process, so it won't work.
> It tells me I've already sent out header information.
>
> I've basically created a single PHP page with a form.  When the form is
> submitted, it submits to itself.  It checks if the form is submitted, and
> then goes to mail the contents to someone.  After mailing, I want to go to a
> Thank You page.  I want to get away from this PHP page, because I don't want
> a person refreshing the page and causing the PHP page to submit again.
>
> Thus, is there something else I can do?  Or am I just not seeing this?
>
> Thanks,
> Stephen
>
>
>
>
> - Original Message -
> From: "James" <[EMAIL PROTECTED]>
> To: "webapprentice" <[EMAIL PROTECTED]>
> Sent: Tuesday, March 26, 2002 10:20 PM
> Subject: Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's location
> tag?
>
>
> > header("Location: http://www.google.com";);
> > replace that url with the page you want it to go to
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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




Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's location tag?

2002-03-26 Thread webapprentice

Hi,
Thanks for the reply.  I saw this as well in the mailing list archives, but
everyone is saying you cannot output ANYTHING before calling header.

Unfortunately, I'm calling this at the end of a process, so it won't work.
It tells me I've already sent out header information.

I've basically created a single PHP page with a form.  When the form is
submitted, it submits to itself.  It checks if the form is submitted, and
then goes to mail the contents to someone.  After mailing, I want to go to a
Thank You page.  I want to get away from this PHP page, because I don't want
a person refreshing the page and causing the PHP page to submit again.

Thus, is there something else I can do?  Or am I just not seeing this?

Thanks,
Stephen




- Original Message -
From: "James" <[EMAIL PROTECTED]>
To: "webapprentice" <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 10:20 PM
Subject: Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's location
tag?


> header("Location: http://www.google.com";);
> replace that url with the page you want it to go to
>
>


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




RE: [PHP] ID NUMBER HELP

2002-03-26 Thread Demitrious S. Kelly

Try echo ''.row["name"].'';

if $row["id"] still isn't shown, then you most likely aren't getting the
right data from the database to the correct variable...

-Original Message-
From: Omland Christopher m [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 26, 2002 7:53 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] ID NUMBER HELP

Can someone help me with this. I'm trying to get ?id= set to the id
number
of the name in the database. I can get ?id="THE NAME" but I can't get it
to pick up the id number. here is the code i"m trying:
while($row = mysql_fetch_array($result))
{

 printf("%s\n", $PHP_SELF,
$row["ID"], $row["Name"], $row["Name"]);
}

If I change the first $row["ID"] to $row["Name"] then ?id="Name here"
but
then when I try to extract the information from the database using:

$result = mysql_query("SELECT * FROM Profiles WHERE id=$id", $dbcnx);
$row = mysql_fetch_array($result);

It won't work, but in the address bar if I manually change ?id=1 then
the
information will load fine. Can anyone help?
Thanks.
-Chris


-- 
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] ID NUMBER HELP

2002-03-26 Thread Omland Christopher m

Can someone help me with this. I'm trying to get ?id= set to the id number
of the name in the database. I can get ?id="THE NAME" but I can't get it
to pick up the id number. here is the code i"m trying:
while($row = mysql_fetch_array($result))
{

 printf("%s\n", $PHP_SELF,
$row["ID"], $row["Name"], $row["Name"]);
}

If I change the first $row["ID"] to $row["Name"] then ?id="Name here" but
then when I try to extract the information from the database using:

$result = mysql_query("SELECT * FROM Profiles WHERE id=$id", $dbcnx);
$row = mysql_fetch_array($result);

It won't work, but in the address bar if I manually change ?id=1 then the
information will load fine. Can anyone help?
Thanks.
-Chris


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




RE: [PHP] Any PHP equivalent of Macromedia ColdFusion's location tag?

2002-03-26 Thread Jason Murray

> Is there any PHP function that works like ColdFusion's location tag?
> After a certain execution, I wish to leave the current PHP 
> page entirely and go to another page.  Is this possible?

That's a HTTP Header, so you want to use the ... Header() command.

A Location header is what does the redirection.

http://url.of.site/path/to/file.html";); ?>

J

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




[PHP] Any PHP equivalent of Macromedia ColdFusion's location tag?

2002-03-26 Thread webapprentice

Is there any PHP function that works like ColdFusion's location tag?
After a certain execution, I wish to leave the current PHP page entirely and go to 
another page.  Is this possible?

I'm scouring the help stuff and am still digging for answers.

Thanks.




RE: [PHP]

2002-03-26 Thread Miguel Cruz

I don't know if this helps, but you may find life becomes simpler if you 
keep all your session variables in one array. Then you can 
session_register that at the very top of your code and cover all bases at 
once.

miguel

On Tue, 26 Mar 2002, Vlad Kulchitski wrote:

> OK, hope you don't mind I follow up a question, and it will be up to you to answer 
>or not, this is very general and important to me.
> 
> My whole project main template is FILE.PHP, the content is changed based on the 
>values sent via QUERY_STRING. SO:
> 
> Below is the approximate outline: (basically the content is loaded from smaller 
>scripts, but main does language switching, loading menu in appropriate language and 
>so on.
> 
> FILE.PHP
>  _about.php
>  _one.php
>  _two.php
> 
> So my question is, is it better to use separate .PHP file for every part of the page 
>and load template design requirements (like 'header' and 'footer') via REQUIRE() so 
>there's no conflict with sessions for instance? Because the code is already BIG:
> 
> http://www.kulchitski.com/btl/source.php
> 
> So anyway, for who are experienced the question goes, is it better to use separate 
>file for every script? Or do like I do use one main and then include('content'php') 
>based on the value passed in the string.
> 
> With my current session problem I don't thnk I can overcome the problem with current 
>design structure, I need to use different file for ADMIN because the template is 
>already formed before it included the file with the script that tries to create a 
>session.
> 
> Anyway, this certainly makes it clearer - thank you guys.
> Vlad
> 
> 
> -Original Message-
> From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
> Sent: 26 ÂÅÒÅÚÎÑ 2002 Ò. 20:41
> To: Vlad Kulchitski
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] 
> 
> On Tue, 26 Mar 2002, Vlad Kulchitski wrote:
> > Hi can anyone help me, I am getting this error when I try
> > to start session:
> > 
> > Warning: Cannot send session cookie - headers already sent by (output
> > started at /var/www/kulchitski/btl/btl.php:2) in
> > /var/www/kulchitski/btl/_talkroom_edit.php on line 39
> > 
> > I didn't start session before, in fact I never use session here
> > except this step. Can anyone suggest anything?
> 
> 1) Read the list and the archive. This comes up at least once per day, 
> including on days when I know I saw you post to the list.
> 
> 2) It means that you generated output prior to a session_register or 
> session_start call. Make sure you don't print anything and don't have any 
> space outside of  
> 3) Read the list and the archive. This comes up at least once per day,
> including on days when I know I saw you post to the list.
> 
> 4) Read the list and the archive. This comes up at least once per day,
> including on days when I know I saw you post to the list.
> 
> miguel
> 
> 


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




[PHP] design pattern

2002-03-26 Thread Kancha .

can anybody point me to tutorial, articles on
implementing design patterns using PHP ??

__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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




RE: [PHP]

2002-03-26 Thread Vlad Kulchitski

OK, hope you don't mind I follow up a question, and it will be up to you to answer or 
not, this is very general and important to me.

My whole project main template is FILE.PHP, the content is changed based on the values 
sent via QUERY_STRING. SO:

Below is the approximate outline: (basically the content is loaded from smaller 
scripts, but main does language switching, loading menu in appropriate language and so 
on.

FILE.PHP
 _about.php
 _one.php
 _two.php

So my question is, is it better to use separate .PHP file for every part of the page 
and load template design requirements (like 'header' and 'footer') via REQUIRE() so 
there's no conflict with sessions for instance? Because the code is already BIG:

http://www.kulchitski.com/btl/source.php

So anyway, for who are experienced the question goes, is it better to use separate 
file for every script? Or do like I do use one main and then include('content'php') 
based on the value passed in the string.

With my current session problem I don't thnk I can overcome the problem with current 
design structure, I need to use different file for ADMIN because the template is 
already formed before it included the file with the script that tries to create a 
session.

Anyway, this certainly makes it clearer - thank you guys.
Vlad


-Original Message-
From: Miguel Cruz [mailto:[EMAIL PROTECTED]] 
Sent: 26 ÂÅÒÅÚÎÑ 2002 Ò. 20:41
To: Vlad Kulchitski
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] 

On Tue, 26 Mar 2002, Vlad Kulchitski wrote:
> Hi can anyone help me, I am getting this error when I try
> to start session:
> 
> Warning: Cannot send session cookie - headers already sent by (output
> started at /var/www/kulchitski/btl/btl.php:2) in
> /var/www/kulchitski/btl/_talkroom_edit.php on line 39
> 
> I didn't start session before, in fact I never use session here
> except this step. Can anyone suggest anything?

1) Read the list and the archive. This comes up at least once per day, 
including on days when I know I saw you post to the list.

2) It means that you generated output prior to a session_register or 
session_start call. Make sure you don't print anything and don't have any 
space outside of http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Building Libraries

2002-03-26 Thread Alexandre Soares

Hi All,


This is my first participation in this group, so my question is I
write a function in c, but I need use this function and more joined in a
library make using the command ar rc alexlib.a x.o, but this procedure show
a error when I use this in my browser, please anyone can help me.

thanks

example

file x.c

int function addvalue ( int *a )
{
 *a = *a + 1;
 return (a);
}


gcc -c x.c
ar rc alexlib.a x.o


php







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




Re: [PHP]

2002-03-26 Thread Miguel Cruz

On Tue, 26 Mar 2002, Vlad Kulchitski wrote:
> Hi can anyone help me, I am getting this error when I try
> to start session:
> 
> Warning: Cannot send session cookie - headers already sent by (output
> started at /var/www/kulchitski/btl/btl.php:2) in
> /var/www/kulchitski/btl/_talkroom_edit.php on line 39
> 
> I didn't start session before, in fact I never use session here
> except this step. Can anyone suggest anything?

1) Read the list and the archive. This comes up at least once per day, 
including on days when I know I saw you post to the list.

2) It means that you generated output prior to a session_register or 
session_start call. Make sure you don't print anything and don't have any 
space outside of http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: Code Bulk

2002-03-26 Thread Gerard Samuel

That is an excellent example.
And just for the hell of it, Ill leave the lines that aren't in the 
function as is, just for the hell of it.
Thanks.

Philip Hallstrom wrote:
> Why not just take that file and remove anything that isn't a function (so
> nothing actually executes) and then do something like:
> 
> print microtime();
> include "thatfile.php";
> print microtime();
> 
> and see how long it took to parse 3000 lines... one more line isn't going
> to make that much difference.
> 
> On Tue, 26 Mar 2002, Gerard Samuel wrote:
> 
> 
>>Actually, the file in question is 3000 lines long, 99% in functions.
>>Im trying to tell him that he may not see any speed ups in code execution.
>>As long as I know Im right, its just the peace of mind when I go to bed
>>tonight :)
>>
>>
>>Martin Towell wrote:
>>
>>>any speed difference will be miniscule/negligible - is speed, to the
>>>microsecond, important in this situation?
>>>
>>>-Original Message-
>>>From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
>>>Sent: Wednesday, March 27, 2002 11:23 AM
>>>To: PHP
>>>Subject:  Code Bulk
>>>
>>>
>>>Im in a debate with someone else.
>>>Basically were debating code bulk.
>>>
>>>This is just an example ->
>>>
>if (isset($run_this_code)) {
>>> echo $this->run_this_code;
>>>}
>>>echo 'Finished';
>>>?>
>>>
>>>Now, if I understand php correctly, the whole script gets parsed, but
>>>since $run_this code isn't set, $this->run_this_code doesn't get
>>>echoed/executed.  What this other person is telling me that its more
>>>effiecient for *him* to have ->
>>>
>echo 'Finished';
>>>?>
>>>
>>>instead.
>>>
>>>The script is a general purpose script.  Its not built for one person.
>>>Some may use $run_this_code and some may not.  So in taking out that bit
>>>of code, all it does is save the parser, what fraction of a fraction of
>>>a second??
>>>Im just looking for ammunition so I could go and shoot this guy down... :)
>>>
>>>Thanks for listening
>>>
>>>
>>
>>
>>
>>--
>>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]

2002-03-26 Thread eric.coleman

That would mean that you have some type of output to the browser, i.e. blank
line, or some text, before you are calling your session/cookie
- Original Message -
From: "Vlad Kulchitski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 8:17 PM
Subject: [PHP]


Hi can anyone help me, I am getting this error when I try
to start session:

Warning: Cannot send session cookie - headers already sent by (output
started at /var/www/kulchitski/btl/btl.php:2) in
/var/www/kulchitski/btl/_talkroom_edit.php on line 39

I didn't start session before, in fact I never use session here
except this step. Can anyone suggest anything?

Thanks,
Vlad

--
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] [Session] (it seems to be a bug in PHP 4.1.2)

2002-03-26 Thread Rasmus Lerdorf

Just to clarify, that is a Windows-specific bug.  Non-Windows works just
fine.

On Tue, 26 Mar 2002, Chris wrote:

> On 26 Mar 2002 at 20:42, Evan wrote:
> > I have PHP 4.1.2 (the latest, I downloaded it a week ago).
>
> PHP 4.1.2 has several bugs.
> One of them is that Apache and sessions variables do not work.
>
> It is best not to upgrade to 4.1.2!
>
> see the bug report on session variables & following discussion and
> suggestions to solve it
>
> http://bugs.php.net/bug.php?id=16102
>
>
> Chris
>
> --
>  !please check my email address   !
>  !only my email [EMAIL PROTECTED] works   !
>  !email [EMAIL PROTECTED] is a black hole since januari 2002 !
>
> Chris Hayes - Droef 35 - Wageningen
>
>
> --
> 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] rdf utf-8 to sql mysql latin1

2002-03-26 Thread David D

Hi all,

My purpose is to transform an rdf utf-8 file into sql for mysql.
Data are both in french/english, in french there are stange caractere that
doesnt render well (çèé...)

What the output had to be ?
Mysql only support latin1 ?

I m lost in all that encodage !

Help me

I dont know how to parametrer the php parser I make.

// create parser
$xp = xml_parser_create("UTF-8");
// set element handler
xml_set_element_handler($xp, "elementBegin", "elementEnd");
xml_set_character_data_handler($xp, "characterData");
xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, TRUE);
xml_parser_set_option($xp, XML_OPTION_SKIP_WHITE, TRUE);
xml_parser_set_option($xp, XML_OPTION_TARGET_ENCODING, 'UTF-8');

Have I to decode / encode

//if (!($xml = utf8_encode($xml))) {
//echo 'ERROR'."\n";
//}

Thanks for all.




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




[PHP]

2002-03-26 Thread Vlad Kulchitski

Hi can anyone help me, I am getting this error when I try
to start session:

Warning: Cannot send session cookie - headers already sent by (output
started at /var/www/kulchitski/btl/btl.php:2) in
/var/www/kulchitski/btl/_talkroom_edit.php on line 39

I didn't start session before, in fact I never use session here
except this step. Can anyone suggest anything?

Thanks,
Vlad

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




RE: [PHP] Re: which php book 2 buy ?

2002-03-26 Thread Vail, Warren

Great photo   :-}

Any reviews on the book yet?

Warren Vail
Tools, Metrics & Quality Processes
(415) 667-7814
Pager (877) 774-9891
215 Fremont 02-658


-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 3:29 PM
To: Scott St. John
Cc: Ralph Friedman; [EMAIL PROTECTED]
Subject: Re: [PHP] Re: which php book 2 buy ?


It is, the picture should prove that.

On Tue, 26 Mar 2002, Scott St. John wrote:

> I didn't think Programming PHP was out yet?
>
>
> On Tue, 26 Mar 2002, Rasmus Lerdorf wrote:
>
> > Or, of course, if you want to be cool like Carl:
> >
> > http://lerdorf.com/buy/
> >
> > ;)
> >
> > -Rasmus
> >
> > On Tue, 26 Mar 2002, Ralph Friedman wrote:
> >
> > > In article <[EMAIL PROTECTED]>, Septic Flesh
wrote:
> > > > I wanna buy a book from amazon . . .but don't know which one..
> > > > Do you know where I will find examples of shopping carts ? (which
book ?)
> > > >
> > >
> > > "Creating Dynamic Web Pages Using PHP and MySQL" by David Tansley.
> > >
> > > --
> > > Rgds
> > > Ralph
> > >
> > >
> > >
> > > --
> > > 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




[PHP] Re: Code Bulk

2002-03-26 Thread Philip Hallstrom

Why not just take that file and remove anything that isn't a function (so
nothing actually executes) and then do something like:

print microtime();
include "thatfile.php";
print microtime();

and see how long it took to parse 3000 lines... one more line isn't going
to make that much difference.

On Tue, 26 Mar 2002, Gerard Samuel wrote:

> Actually, the file in question is 3000 lines long, 99% in functions.
> Im trying to tell him that he may not see any speed ups in code execution.
> As long as I know Im right, its just the peace of mind when I go to bed
> tonight :)
>
>
> Martin Towell wrote:
> > any speed difference will be miniscule/negligible - is speed, to the
> > microsecond, important in this situation?
> >
> > -Original Message-
> > From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 27, 2002 11:23 AM
> > To: PHP
> > Subject:  Code Bulk
> >
> >
> > Im in a debate with someone else.
> > Basically were debating code bulk.
> >
> > This is just an example ->
> >
> >  > if (isset($run_this_code)) {
> >  echo $this->run_this_code;
> > }
> > echo 'Finished';
> > ?>
> >
> > Now, if I understand php correctly, the whole script gets parsed, but
> > since $run_this code isn't set, $this->run_this_code doesn't get
> > echoed/executed.  What this other person is telling me that its more
> > effiecient for *him* to have ->
> >
> >  > echo 'Finished';
> > ?>
> >
> > instead.
> >
> > The script is a general purpose script.  Its not built for one person.
> > Some may use $run_this_code and some may not.  So in taking out that bit
> > of code, all it does is save the parser, what fraction of a fraction of
> > a second??
> > Im just looking for ammunition so I could go and shoot this guy down... :)
> >
> > Thanks for listening
> >
> >
>
>
>
> --
> 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] Code Bulk

2002-03-26 Thread Gerard Samuel

Actually, the file in question is 3000 lines long, 99% in functions.
Im trying to tell him that he may not see any speed ups in code execution.
As long as I know Im right, its just the peace of mind when I go to bed 
tonight :)


Martin Towell wrote:
> any speed difference will be miniscule/negligible - is speed, to the
> microsecond, important in this situation?
> 
> -Original Message-
> From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 27, 2002 11:23 AM
> To: PHP
> Subject: [PHP] Code Bulk
> 
> 
> Im in a debate with someone else.
> Basically were debating code bulk.
> 
> This is just an example ->
> 
>  if (isset($run_this_code)) {
>  echo $this->run_this_code;
> }
> echo 'Finished';
> ?>
> 
> Now, if I understand php correctly, the whole script gets parsed, but 
> since $run_this code isn't set, $this->run_this_code doesn't get 
> echoed/executed.  What this other person is telling me that its more 
> effiecient for *him* to have ->
> 
>  echo 'Finished';
> ?>
> 
> instead.
> 
> The script is a general purpose script.  Its not built for one person. 
> Some may use $run_this_code and some may not.  So in taking out that bit 
> of code, all it does is save the parser, what fraction of a fraction of 
> a second??
> Im just looking for ammunition so I could go and shoot this guy down... :)
> 
> Thanks for listening
> 
> 



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




RE: [PHP] Code Bulk

2002-03-26 Thread Martin Towell

any speed difference will be miniscule/negligible - is speed, to the
microsecond, important in this situation?

-Original Message-
From: Gerard Samuel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 11:23 AM
To: PHP
Subject: [PHP] Code Bulk


Im in a debate with someone else.
Basically were debating code bulk.

This is just an example ->

run_this_code;
}
echo 'Finished';
?>

Now, if I understand php correctly, the whole script gets parsed, but 
since $run_this code isn't set, $this->run_this_code doesn't get 
echoed/executed.  What this other person is telling me that its more 
effiecient for *him* to have ->



instead.

The script is a general purpose script.  Its not built for one person. 
Some may use $run_this_code and some may not.  So in taking out that bit 
of code, all it does is save the parser, what fraction of a fraction of 
a second??
Im just looking for ammunition so I could go and shoot this guy down... :)

Thanks for listening


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

2002-03-26 Thread Gerard Samuel

Im in a debate with someone else.
Basically were debating code bulk.

This is just an example ->

run_this_code;
}
echo 'Finished';
?>

Now, if I understand php correctly, the whole script gets parsed, but 
since $run_this code isn't set, $this->run_this_code doesn't get 
echoed/executed.  What this other person is telling me that its more 
effiecient for *him* to have ->



instead.

The script is a general purpose script.  Its not built for one person. 
Some may use $run_this_code and some may not.  So in taking out that bit 
of code, all it does is save the parser, what fraction of a fraction of 
a second??
Im just looking for ammunition so I could go and shoot this guy down... :)

Thanks for listening


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




Re: [PHP] Loading Images

2002-03-26 Thread Justin French

U, is that correct?

I thought (although never tried) that you could reference an image as

 or simular, in which case the headers and
everything else CAN be sent in the image tag, which is embeded in a HTML
page -- isn't that how they do counters etc etc??

At the moment, I'm just storing my images in my file system, and storing the
URLs in my database (as discussed by someone else in this thread), which
works fine, as long as nobody deletes the image without deleting the URL
from the DB.

On the topic of preventing users from saving images, the attempts are
futile, because they can also just look at your source to DL the image from
it's URL.

One thing I have seen work instead of disabling right-click is to have a
clear layer (DIV) above the whole page, which (for me) prevents me from
selecting text + images from below.  Although I don't know how reliable this
is.


Justin French
-
http://indent.com.au
http://soundpimps.com
-






on 27/03/02 10:16 AM, Kevin Stone ([EMAIL PROTECTED]) wrote:

> It is quite easy to store images in a database and display them on the
> screen.  You can find tutorials about this online (sorry I don't have
> any direct links).  There are also numerous FREE scripts pre-written
> that you can integrate into your site, or use to learn how to do this
> yourself.
> 
> There is a catch however... and that is you will not be able to display
> anything else along with those images because special content headers
> must be sent to let the browser know what kind of data it's receiving.
> Is it a JPEG, GIF or PNG?  If the headers are not sent, or the wrong
> headers are sent, the image will either not display or the user will see
> endless rows of junk text spewed onto the screen (the binary data in
> ASCII form!!).
> 
> So this method will only work if you want to display the images in a
> frame, one at a time, and by them selves.  You won't be able to
> intermingle HTML so forget about doing dynamic menus with this method.
> 
> The way these dynamic sites work is by storing the paths to each image
> in the database rather than the images themselves... so you're back to
> the file system solution.
> 
> Anyway I hope this helps answer some of the questions you were having
> about this method.  :)
> 
> -Kevin
> 
> -Original Message-
> From: Omland Christopher m [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 2:45 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Loading Images
> 
> I wasn't so much concearned about security of users grabbin pics. I am
> more trying to learn how these people load there menus dynamically and
> pics dynamically. Do you have any links to pages or code that describe
> how
> to make a link in the db to pics on my filesystem?
> Thanks.
> -Chris
> 
> On Tue, 26 Mar 2002 [EMAIL PROTECTED] wrote:
> 
>> At 26.03.2002  12:47, you wrote:
>>> 
>>> I don't have any code for this, but I'm hoping someone can point me
> in the
>>> right direction. I want to load images or navigation menus
> dynamically. Is
>>> it possible to build a database of images and then use php to display
>>> them? Or something along these lines. I know this must be possible,
>>> becuase I see sites that do something like this, and I cant seem to
> right
>>> click the image and save it. Does this make any sense?
>>> Thanks.
>>> -Chris
>> Storing images in a db is not a good idea. instead store them
>> in your filesystem an have a reference to them in your db.
>> Then you can make everything ;-)
>> 
>> Even there´s no real security for grabbing pics. If your client can
> see them,
>> they are on his/her machine. To prevent the right-click, you have to
> use
>> JavaScript, but that only works, if the user has it switched on.
>> A little more secure is putting the pics in flash-movies. But I think
> there are
>> already programs out, which allow to extract pictures and componenets.
>> HTH Oliver
>> 
>> 
>> --
>> 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] Re: OT Re: [PHP] Re: which php book 2 buy ?

2002-03-26 Thread Rasmus Lerdorf

No idea, I don't follow O'Reilly covers all that closely.  This one
arrived on my doorstep a couple of days ago.  According to Barnes & Noble
it starts shipping today.  Not sure why Amazon says it isn't published
yet.  The fact that I have a copy would seem to disprove that.

-Rasmus

On Tue, 26 Mar 2002, Erik Price wrote:

> Totally off topic --
>
> I thought that O'Reilly had switched to using a white binding with black
> text on all of their newly-[re]printed books.  The picture of the
> sleeping babe with the book shows an older style, with a colored field
> (green) and white text.  Maybe this is a localization thing.
>
>
> On Tuesday, March 26, 2002, at 01:51  PM, Rasmus Lerdorf wrote:
>
> > Or, of course, if you want to be cool like Carl:
> >
> > http://lerdorf.com/buy/
> >
> > ;)
> >
>
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>


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




Re: [PHP] Re: which php book 2 buy ?

2002-03-26 Thread Rasmus Lerdorf

It is, the picture should prove that.

On Tue, 26 Mar 2002, Scott St. John wrote:

> I didn't think Programming PHP was out yet?
>
>
> On Tue, 26 Mar 2002, Rasmus Lerdorf wrote:
>
> > Or, of course, if you want to be cool like Carl:
> >
> > http://lerdorf.com/buy/
> >
> > ;)
> >
> > -Rasmus
> >
> > On Tue, 26 Mar 2002, Ralph Friedman wrote:
> >
> > > In article <[EMAIL PROTECTED]>, Septic Flesh wrote:
> > > > I wanna buy a book from amazon . . .but don't know which one..
> > > > Do you know where I will find examples of shopping carts ? (which book ?)
> > > >
> > >
> > > "Creating Dynamic Web Pages Using PHP and MySQL" by David Tansley.
> > >
> > > --
> > > Rgds
> > > Ralph
> > >
> > >
> > >
> > > --
> > > 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 sending email message, from Newman.

2002-03-26 Thread Miguel Cruz

Ah, never mind, the problem is that your From: header is invalid.

You have:

   From: Philip J. Newman

which is not a valid address format. Try something like this:

   From: "Philip J. Newman" <[EMAIL PROTECTED]>

miguel

On Wed, 27 Mar 2002, Philip J. Newman wrote:

> $email = [EMAIL PROTECTED] example
> 
> - Original Message -
> From: "Miguel Cruz" <[EMAIL PROTECTED]>
> To: "Philip J. Newman" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Wednesday, March 27, 2002 11:14 AM
> Subject: Re: [PHP] Problem sending email message, from Newman.
> 
> 
> > Can you show the contents of the variable $email ?
> >
> > miguel
> >
> > On Wed, 27 Mar 2002, Philip J. Newman wrote:
> >
> > > Below is some code that I have used to send an email Via mail. The
> message
> > > sends with the correct data, HOWEVER my mail server don't like the
> header
> > > and sends the email back to admin.
> > >
> > > ROUTER: Failure delivering mail message to recipient: [EMAIL PROTECTED]
> > > [ROUTER: Unexpected SMTP Server 'ihug.co.nz' [250] received: 550 Syntax
> > > error in 'From' header: missing or malformed local part (expected word
> or
> > > "<"): failing address is: Philip J. Newman]
> > >
> > > Can anyone help with this
> > >
> > >  $msg = "Thanks, $name.  Your entry had been added, Good Luck.";
> > >  $msg .= "Email: $email.\n";
> > >  $msg .= "Text: $address, $suburb.\n";
> > >  $msg .= "Answer: $answer";
> > >
> > >  $mailheaders = "From: Philip J. Newman\n";
> > >  $mailheaders .= "Reply-To: [EMAIL PROTECTED]\n\n";
> > >
> > >  mail("$email", "[Newman] Conformation of entry. ", $msg, $mailheaders);
> >
> >
> > --
> > 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 sending email message, from Newman.

2002-03-26 Thread Philip J. Newman

$email = [EMAIL PROTECTED] example

- Original Message -
From: "Miguel Cruz" <[EMAIL PROTECTED]>
To: "Philip J. Newman" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 11:14 AM
Subject: Re: [PHP] Problem sending email message, from Newman.


> Can you show the contents of the variable $email ?
>
> miguel
>
> On Wed, 27 Mar 2002, Philip J. Newman wrote:
>
> > Below is some code that I have used to send an email Via mail. The
message
> > sends with the correct data, HOWEVER my mail server don't like the
header
> > and sends the email back to admin.
> >
> > ROUTER: Failure delivering mail message to recipient: [EMAIL PROTECTED]
> > [ROUTER: Unexpected SMTP Server 'ihug.co.nz' [250] received: 550 Syntax
> > error in 'From' header: missing or malformed local part (expected word
or
> > "<"): failing address is: Philip J. Newman]
> >
> > Can anyone help with this
> >
> >  $msg = "Thanks, $name.  Your entry had been added, Good Luck.";
> >  $msg .= "Email: $email.\n";
> >  $msg .= "Text: $address, $suburb.\n";
> >  $msg .= "Answer: $answer";
> >
> >  $mailheaders = "From: Philip J. Newman\n";
> >  $mailheaders .= "Reply-To: [EMAIL PROTECTED]\n\n";
> >
> >  mail("$email", "[Newman] Conformation of entry. ", $msg, $mailheaders);
>
>
> --
> 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] Loading Images

2002-03-26 Thread Kevin Stone

It is quite easy to store images in a database and display them on the
screen.  You can find tutorials about this online (sorry I don't have
any direct links).  There are also numerous FREE scripts pre-written
that you can integrate into your site, or use to learn how to do this
yourself.

There is a catch however... and that is you will not be able to display
anything else along with those images because special content headers
must be sent to let the browser know what kind of data it's receiving.
Is it a JPEG, GIF or PNG?  If the headers are not sent, or the wrong
headers are sent, the image will either not display or the user will see
endless rows of junk text spewed onto the screen (the binary data in
ASCII form!!).

So this method will only work if you want to display the images in a
frame, one at a time, and by them selves.  You won't be able to
intermingle HTML so forget about doing dynamic menus with this method.

The way these dynamic sites work is by storing the paths to each image
in the database rather than the images themselves... so you're back to
the file system solution.

Anyway I hope this helps answer some of the questions you were having
about this method.  :)

-Kevin

-Original Message-
From: Omland Christopher m [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, March 26, 2002 2:45 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Loading Images

I wasn't so much concearned about security of users grabbin pics. I am
more trying to learn how these people load there menus dynamically and
pics dynamically. Do you have any links to pages or code that describe
how
to make a link in the db to pics on my filesystem?
Thanks.
-Chris

On Tue, 26 Mar 2002 [EMAIL PROTECTED] wrote:

> At 26.03.2002  12:47, you wrote:
> >
> >I don't have any code for this, but I'm hoping someone can point me
in the
> >right direction. I want to load images or navigation menus
dynamically. Is
> >it possible to build a database of images and then use php to display
> >them? Or something along these lines. I know this must be possible,
> >becuase I see sites that do something like this, and I cant seem to
right
> >click the image and save it. Does this make any sense?
> >Thanks.
> >-Chris
> Storing images in a db is not a good idea. instead store them
> in your filesystem an have a reference to them in your db.
> Then you can make everything ;-)
>
> Even there´s no real security for grabbing pics. If your client can
see them,
> they are on his/her machine. To prevent the right-click, you have to
use
> JavaScript, but that only works, if the user has it switched on.
> A little more secure is putting the pics in flash-movies. But I think
there are
> already programs out, which allow to extract pictures and componenets.
> HTH Oliver
>
>
> --
> 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 sending email message, from Newman.

2002-03-26 Thread Miguel Cruz

Can you show the contents of the variable $email ?

miguel

On Wed, 27 Mar 2002, Philip J. Newman wrote:

> Below is some code that I have used to send an email Via mail. The message
> sends with the correct data, HOWEVER my mail server don't like the header
> and sends the email back to admin.
> 
> ROUTER: Failure delivering mail message to recipient: [EMAIL PROTECTED]
> [ROUTER: Unexpected SMTP Server 'ihug.co.nz' [250] received: 550 Syntax
> error in 'From' header: missing or malformed local part (expected word or
> "<"): failing address is: Philip J. Newman]
> 
> Can anyone help with this
> 
>  $msg = "Thanks, $name.  Your entry had been added, Good Luck.";
>  $msg .= "Email: $email.\n";
>  $msg .= "Text: $address, $suburb.\n";
>  $msg .= "Answer: $answer";
> 
>  $mailheaders = "From: Philip J. Newman\n";
>  $mailheaders .= "Reply-To: [EMAIL PROTECTED]\n\n";
> 
>  mail("$email", "[Newman] Conformation of entry. ", $msg, $mailheaders);


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




Re: [PHP] Where is php.ini on Mac OS X?

2002-03-26 Thread Richard Baskett

Try looking in your /usr/local/bin directory.. It should be there.

Cheers!

Rick

"And God shall wipe away all tears from their eyes; and there shall be no
more death, neither sorrow, nor crying, neither shall there be any more
pain: for the former things are passed away." - Revelation 21:4


> From: "Chuck \"PUP\" Payne" <[EMAIL PROTECTED]>
> Date: Tue, 26 Mar 2002 17:49:44 -0500
> To: <[EMAIL PROTECTED]>
> Subject: [PHP] Where is php.ini on Mac OS X?
> 
> Can some one please tell me where php.ini is located on Mac OS X?
> 
> Thanks,
> 
> Chuck Payne
> Magi Design and Support
> 
> 
> -- 
> 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] Problem sending email message, from Newman.

2002-03-26 Thread Philip J. Newman

Below is some code that I have used to send an email Via mail. The message
sends with the correct data, HOWEVER my mail server don't like the header
and sends the email back to admin.

ROUTER: Failure delivering mail message to recipient: [EMAIL PROTECTED]
[ROUTER: Unexpected SMTP Server 'ihug.co.nz' [250] received: 550 Syntax
error in 'From' header: missing or malformed local part (expected word or
"<"): failing address is: Philip J. Newman]

Can anyone help with this

 $msg = "Thanks, $name.  Your entry had been added, Good Luck.";
 $msg .= "Email: $email.\n";
 $msg .= "Text: $address, $suburb.\n";
 $msg .= "Answer: $answer";

 $mailheaders = "From: Philip J. Newman\n";
 $mailheaders .= "Reply-To: [EMAIL PROTECTED]\n\n";

 mail("$email", "[Newman] Conformation of entry. ", $msg, $mailheaders);

Philip J. Newman
PhilipNZ :: Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]
ICQ# 20482482
+64 25 6144012




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




RE: [PHP] [Session]

2002-03-26 Thread Johnson, Kirk

> I am probably wrong about this, but I thought that you could register 
> session variables using this technique only if you are using 
> PHP 4.1.x 
> and you use the format:
> 
> $_SESSION['v_s'] = 500;

The key point is the register_globals setting in php.ini. If it is set to
on, then register variables this way, regardless of the version:

$v_s = 500;
session_register{'v_s');

If it is set to off, then do as above, assuming your version is new enough
to support the new array $_SESSION[]:

$_SESSION['v_s'] = 500;

The array $_SESSION[] is pretty new, maybe 4.1.2? Even with this new array,
you can still use the old method for registering variables. Also, in a
recent release, or else coming up shortly, the default setting for
register_globals will be changed from "on" to "off".

Kirk

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




RE: [PHP] [Newman] Help Needed with a redir script.

2002-03-26 Thread SHEETS,JASON (Non-HP-Boise,ex1)

Not sure on the 404 part, you might look at CURL.

For the DNS part you could do

if (!gethostbyname(server1.dydns.org)) {
header ("Location server2.dycns.org");
}

This function is in the PHP manual.

Jason

-Original Message-
From: Philip J. Newman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 2:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP] [Newman] Help Needed with a redir script.


I have a list of links!

$linkone="http://server1.dyndns.org/";;
$linktwo="http://server2.dyndns.org/";;

I would like to make a script that looks for http://server1.dyndns.org/, if
it returns a 404, or DNS error then it redirects to
http://server2.dyndns.org/ this server.

Any suggestions.


Philip J. Newman
PhilipNZ :: Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]
ICQ# 20482482
+64 25 6144012




-- 
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 and APACHE & VirtualDomains

2002-03-26 Thread Max Wilson

We have PHP and APACHE (1.3.19) installed and an instance of apache is
running with php support enabled.

I need to set up another instance of httpd using a seperate config file.
However I cannot get PHP support enabled.

I cannot find where the PHP modules are.  I called a phpinfo() on the
instance which is already running and it returned:

It said the config file was in /usr/local/lib/php.ini

I think i am looking for the module mod_php4 but I cannot see where it is.
Any ideas?

ALSO

I'm having lots of trouble with VirtualDomains.

I have an instance second httpd running (without php) on a port other than
80 and it runs fine.  But whenever I add VirtualDomain to the httpd.conf the
main page gets replaced by the main page of the VirtualDomain.  This is
really anoying me is there anything I should check for?

Thanks



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




[PHP] Where is php.ini on Mac OS X?

2002-03-26 Thread Chuck \"PUP\" Payne

Can some one please tell me where php.ini is located on Mac OS X?

Thanks,

Chuck Payne
Magi Design and Support


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




[PHP] Where is php.ini on Mac OS X?

2002-03-26 Thread Chuck \"PUP\" Payne

Can some one please tell me where php.ini is located on Mac OS X?

Thanks,

Chuck Payne
Magi Design and Support


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




Re: [PHP] [Session] (it seems to be a bug in PHP 4.1.2)

2002-03-26 Thread Chris

On 26 Mar 2002 at 20:42, Evan wrote:
> I have PHP 4.1.2 (the latest, I downloaded it a week ago).

PHP 4.1.2 has several bugs.
One of them is that Apache and sessions variables do not work.

It is best not to upgrade to 4.1.2!

see the bug report on session variables & following discussion and 
suggestions to solve it 

http://bugs.php.net/bug.php?id=16102


Chris

-- 
 !  please check my email address   !  
 !  only my email [EMAIL PROTECTED] works   !
 !  email [EMAIL PROTECTED] is a black hole since januari 2002 !

Chris Hayes - Droef 35 - Wageningen


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




[PHP] Having problems getting file uploads to work properly

2002-03-26 Thread Joel Caturia

Greetings:
 
I am having problems getting file uploads to completely function. I have
a test script that acknowledges the file was successfully uploaded, and
I can use the “move_uploaded_file” function without error, however,
NOTHING shows up in any of the directories I’m dealing with.
 
I know my file permissions are set correctly, and I had this problem
with both PHP compiled fresh on OpenBSD, and PHP installed on Win2K.
This is with the newest version 4.1.2, where they fixed some security
problems with the file upload functionality.

Is there perhaps a correlation?
 
Thanks!
 
- Joel
 



Re: [PHP] Loading Images

2002-03-26 Thread Omland Christopher m

I wasn't so much concearned about security of users grabbin pics. I am
more trying to learn how these people load there menus dynamically and
pics dynamically. Do you have any links to pages or code that describe how
to make a link in the db to pics on my filesystem?
Thanks.
-Chris

On Tue, 26 Mar 2002 [EMAIL PROTECTED] wrote:

> At 26.03.2002  12:47, you wrote:
> >
> >I don't have any code for this, but I'm hoping someone can point me in the
> >right direction. I want to load images or navigation menus dynamically. Is
> >it possible to build a database of images and then use php to display
> >them? Or something along these lines. I know this must be possible,
> >becuase I see sites that do something like this, and I cant seem to right
> >click the image and save it. Does this make any sense?
> >Thanks.
> >-Chris
> Storing images in a db is not a good idea. instead store them
> in your filesystem an have a reference to them in your db.
> Then you can make everything ;-)
>
> Even there´s no real security for grabbing pics. If your client can see them,
> they are on his/her machine. To prevent the right-click, you have to use
> JavaScript, but that only works, if the user has it switched on.
> A little more secure is putting the pics in flash-movies. But I think there are
> already programs out, which allow to extract pictures and componenets.
> HTH Oliver
>
>
> --
> 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] [Newman] Help Needed with a redir script.

2002-03-26 Thread Philip J. Newman

I have a list of links!

$linkone="http://server1.dyndns.org/";;
$linktwo="http://server2.dyndns.org/";;

I would like to make a script that looks for http://server1.dyndns.org/, if
it returns a 404, or DNS error then it redirects to
http://server2.dyndns.org/ this server.

Any suggestions.


Philip J. Newman
PhilipNZ :: Design Solutions
http://www.philipnz.com/
[EMAIL PROTECTED]
ICQ# 20482482
+64 25 6144012




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




Re: [PHP] Loading Images

2002-03-26 Thread heinisch

At 26.03.2002  12:47, you wrote:
>
>I don't have any code for this, but I'm hoping someone can point me in the
>right direction. I want to load images or navigation menus dynamically. Is
>it possible to build a database of images and then use php to display
>them? Or something along these lines. I know this must be possible,
>becuase I see sites that do something like this, and I cant seem to right
>click the image and save it. Does this make any sense?
>Thanks.
>-Chris
Storing images in a db is not a good idea. instead store them
in your filesystem an have a reference to them in your db.
Then you can make everything ;-)

Even there´s no real security for grabbing pics. If your client can see them,
they are on his/her machine. To prevent the right-click, you have to use
JavaScript, but that only works, if the user has it switched on.
A little more secure is putting the pics in flash-movies. But I think there are
already programs out, which allow to extract pictures and componenets.
HTH Oliver


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




RE: [PHP] sorting data from a field

2002-03-26 Thread Rick Emery

you can extract and sort on the last name:
mysql> select substring(myname,locate(" ",myname)+1) as lname from mytable
order by lname;

this assumes names are stored as "john doe", that is with a space separator

-Original Message-
From: Chuck Barnett [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 03, 2002 2:50 PM
To: PHP General List
Subject: [PHP] sorting data from a field


Hello again :)

 I have a db field that holds the first and last name of a person.  Is
there a way to sort by the last name in that field?

The whole reason for this is to populate a select box sorted by last name.

I don't want to go back and create a separate field if I don't have to.

Any help is appreciated.

Thanks,
Chuck



-- 
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 data from a field

2002-03-26 Thread javier

To do that is it necesary to loop the $result variable and assign each
array($name => $value) ?


> Alternately, you can load all of the unsorted results into an associative
> array, and use PHP's native sorting functions (such as ksort() ) to sort the
> results.
> 
> 
> Darren Gamble
> Planner, Regional Services
> Shaw Cablesystems GP
> 630 - 3rd Avenue SW
> Calgary, Alberta, Canada
> T2P 4L4
> (403) 781-4948


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




[PHP] templates with php

2002-03-26 Thread javier

Has anybody uses other engine besides Smart or php-templates (@freebsd 
ports)

I trying to get into the subject but I don't know which to start with.


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




RE: [PHP] sorting data from a field

2002-03-26 Thread Darren Gamble

Good day,

Sorry, I didn't read your request as clearly as I should have. =)

If you have a single field, the best way would be to load all of the
results, and then have PHP split() the results by whitespace.  Then store
the results by associative array and use ksort() to sort them.

The best way would be to have a first name and last name field.  This
addresses situations where people have their family name first and their
given name second.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Darren Gamble [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 2:13 PM
To: 'Chuck Barnett'; PHP General List
Subject: RE: [PHP] sorting data from a field


Good day.

You can do this using the "ORDER" clause in SQL.  Please consult your
particular database's documentation for more information.

Alternately, you can load all of the unsorted results into an associative
array, and use PHP's native sorting functions (such as ksort() ) to sort the
results.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Chuck Barnett [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 03, 2002 1:50 PM
To: PHP General List
Subject: [PHP] sorting data from a field


Hello again :)

 I have a db field that holds the first and last name of a person.  Is
there a way to sort by the last name in that field?

The whole reason for this is to populate a select box sorted by last name.

I don't want to go back and create a separate field if I don't have to.

Any help is appreciated.

Thanks,
Chuck



-- 
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] sorting data from a field

2002-03-26 Thread Darren Gamble

Good day.

You can do this using the "ORDER" clause in SQL.  Please consult your
particular database's documentation for more information.

Alternately, you can load all of the unsorted results into an associative
array, and use PHP's native sorting functions (such as ksort() ) to sort the
results.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Chuck Barnett [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 03, 2002 1:50 PM
To: PHP General List
Subject: [PHP] sorting data from a field


Hello again :)

 I have a db field that holds the first and last name of a person.  Is
there a way to sort by the last name in that field?

The whole reason for this is to populate a select box sorted by last name.

I don't want to go back and create a separate field if I don't have to.

Any help is appreciated.

Thanks,
Chuck



-- 
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 data from a field

2002-03-26 Thread Miguel Cruz

On Sun, 3 Feb 2002, Chuck Barnett wrote:
>  I have a db field that holds the first and last name of a person.  Is
> there a way to sort by the last name in that field?
> 
> The whole reason for this is to populate a select box sorted by last name.
> 
> I don't want to go back and create a separate field if I don't have to.

You can do something cheesy like this:

  select name from table order by substring(name, locate(' ', name))

but really I'd advise splitting it into separate fields because your 
queries will run faster and you'll have more flexibility in the long term.

miguel


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




[PHP] sorting data from a field

2002-03-26 Thread Chuck Barnett

Hello again :)

 I have a db field that holds the first and last name of a person.  Is
there a way to sort by the last name in that field?

The whole reason for this is to populate a select box sorted by last name.

I don't want to go back and create a separate field if I don't have to.

Any help is appreciated.

Thanks,
Chuck



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




Re: [PHP] [Session]

2002-03-26 Thread Erik Price


On Tuesday, March 26, 2002, at 02:42  PM, Evan wrote:

> I have PHP 4.1.2 (the latest, I downloaded it a week ago).
> The manual says that:
> *
> If track_vars is enabled and register_globals is disabled, only members 
> of
> the global associative array $HTTP_SESSION_VARS can be registered as 
> session
> variables. The restored session variables will only be available in the
> array $HTTP_SESSION_VARS.
> *
>
> I won't use $_SESSION cause it seems that is a bit buggy have a 
> search
> with google->user group "$_SESSION".

Okay, suit yourself -- but a reminder that $_SESSION is the 'official' 
method of referring to the SESSION array, and that $HTTP_SESSION_VARS 
has been deprecated and may not be available in a later release of PHP, 
thus rendering your code obsolete if you should ever upgrade.  Read it 
for yourself, 
http://www.php.net/manual/en/language.variables.predefined.php


Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] FTP RAW

2002-03-26 Thread Analysis & Solutions

Hey Chris:

On Tue, Mar 26, 2002 at 12:44:21PM -0700, Chris wrote:
> OK. I don't know how I can be more specific, but I will try.

Dude, let's look at your initial question to the list:

>> Can anyone help me with the command I need for a RAW FTP file
>> upload?  I can create connections and they empty file, but I have no
>> idea how to get the data into the file and I have tried everything.

That's vague.  Now that you've clarified a bit of how you're doing what
you're trying to do, let's see what we can do to help...


> I have used fopen(ftp://url) to upload files to the FTP server from a 
> web form, however this fails on files over 5k in size.
> 
> I do not have the FTP functions installed on the server I will be using.
> 
> I simply want to know how I would use the raw FTP commands with an
> fsockopen() function. I know how to use this to connect to the file server,
> change directories, etc.. The question is how do I use the fsocket() with
> raw FTP commands to upload a file? Is that not specific?

Just so I'm being clear, When I was talking about fopen(), fputs() and
fclose(), I meant you need to make a file on your local hard drive
first. I wasn't talking about using these functions directly with the
file pointer generated by fsockopen().  Anwyway, once the file is
created on your drive, THEN, you can use FTP to put the file on the
remote server.

Okay, to be straight up, I haven't used PHP's socket functions yet.  
It's cool, you're able log in and to cd into the right directory.  Uh,
now what to do???  Let's see what the FRC for FTP says...
ftp://ftp.isi.edu/in-notes/rfc959.txt.  How about trying:

   fputs($fp, "STOR ./foo.txt\r\n");

--Dan

-- 
PHP scripts that make your job easier
  http://www.analysisandsolutions.com/code/
 SQL Solution  |  Layout Solution  |  Form Solution
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y

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




[PHP] Re: Merging Results of Queries

2002-03-26 Thread Julio Nobrega Trabalhando

  You can select from multiple databases and tables, ie:

SELECT database.table.field, otherdb.othertable.other FROM database.table,
otherdb.othertable;

  Even from two, three, four databases. But your queries might either get
too complicated or slow.

  So, store the results from simpler selects, using only two databases, on
temporaries tables of Type = HEAP. It's like they are 'memory tables', and
faster. So you can again select from another database and from this
temporary.

  Well, use temporary table to reduce the number of Joins :-)

  This is kind of a query merger done in sql... other option is to merge the
individual sql queries using array_merge or similar functions.

--

Julio Nobrega.

"Daniel Ferreira Castro" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello guys
>
> I have a database system that has many databases and many tables on each
> database.  I am trying to create a kind of search engine to seek data all
> over my database.
>
> I need to know if is possible to merge the results of my queries to later
> show them on a table or it is easier to perform the query and print the
> results on a HTML table leaving the table open, than perform another query
> and print it on until it is all over and close the table with
?
>
> Thank you
>
> Daniel F. Castro
> [EMAIL PROTECTED]
>
>
>
>



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




RE: [PHP] strip spaces from inside string

2002-03-26 Thread Rick Emery



-Original Message-
From: Chuck Barnett [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 03, 2002 2:01 PM
To: PHP General List
Subject: [PHP] strip spaces from inside string


Say I have a string "xyz abc def"  and I want to remove all of the spaces
withing the string to create a new one.  What's the best way?

Thanks,
ChuckB


-- 
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] strip spaces from inside string

2002-03-26 Thread Chris Boget

> Say I have a string "xyz abc def"  and I want to remove all of the spaces
> withing the string to create a new one.  What's the best way?



Or you can use eregi_replace(), but I don't know what the regex would be.
I *think* you can do:




Chris


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




[PHP] strip spaces from inside string

2002-03-26 Thread Chuck Barnett

Say I have a string "xyz abc def"  and I want to remove all of the spaces
withing the string to create a new one.  What's the best way?

Thanks,
ChuckB


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




[PHP] Merging Results of Queries

2002-03-26 Thread Daniel Ferreira Castro

Hello guys

I have a database system that has many databases and many tables on each
database.  I am trying to create a kind of search engine to seek data all
over my database.

I need to know if is possible to merge the results of my queries to later
show them on a table or it is easier to perform the query and print the
results on a HTML table leaving the table open, than perform another query
and print it on until it is all over and close the table with ?

Thank you

Daniel F. Castro
[EMAIL PROTECTED]





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




[PHP] Loading Images

2002-03-26 Thread Omland Christopher m

I don't have any code for this, but I'm hoping someone can point me in the
right direction. I want to load images or navigation menus dynamically. Is
it possible to build a database of images and then use php to display
them? Or something along these lines. I know this must be possible,
becuase I see sites that do something like this, and I cant seem to right
click the image and save it. Does this make any sense?
Thanks.
-Chris



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




Re: [PHP] FTP RAW

2002-03-26 Thread Chris

OK. I don't know how I can be more specific, but I will try. I have used
fopen(ftp://url) to upload files to the FTP server from a web form, however
this fails on files over 5k in size.

I do not have the FTP functions installed on the server I will be using.

I simply want to know how I would use the raw FTP commands with an
fsockopen() function. I know how to use this to connect to the file server,
change directories, etc.. The question is how do I use the fsocket() with
raw FTP commands to upload a file? Is that not specific?

"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Chris:
>
> > Yes. Your solutions fails for any file over 5k about 99% of the time.
The
> > server I use does not have the FTP functions installed so I cannot use
>
> I wouldn't really call it "your solution," since it's really "the
> solution."  FTP stands for File Transfer Protocol.  If you don't have a
> file, you don't have FTP.  Your initial post didn't say you didn't have
> the FTP functions available.
>
>
> > that is why I am looking to this solution.
>
> Uh, care to share which solution you're talking about?  The only way we
> can help you is if you start geting specific.  Clearly and thoroughly
> explain the methods you're using.  Even better, include the code that's
> not working.
>
> Another option is to forget the files and FTP alltogether, switching to
> sockets instead.  PHP has some new functions for this, but, again, your
> server may not have them up.  If that's the case, can you use Perl?
>
> Enjoy,
>
> --Dan
>
> --
> PHP scripts that make your job easier
>   http://www.analysisandsolutions.com/code/
>  SQL Solution  |  Layout Solution  |  Form Solution
>  T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y



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




[PHP] apache in win32 !

2002-03-26 Thread Septic Flesh

I know that this is 4 php questions but I bet most of you came across
something similar.

well I am running an apache server both in a linux and a win2k . .to support
my php code..

does the .htaccess & .htpasswd work in both OSs?

In linux works just fine, while in windows it prompts for the user/passwd
but nothing after that.

-


AuthUserFile "C:/nusphere/apache/htdocs/myphpmysqldirectory/.htpasswd"

AuthGroupFile /dev/null

AuthName Admin

AuthType Basic

AllowOverride Limit



require user nrasid





-

same piece of code works with linux (of cource different dirs)

Apache/1.3.20

Thanks..


--


Sapilas@/dev/pinkeye





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




Re: [PHP] [Session]

2002-03-26 Thread Evan

I have PHP 4.1.2 (the latest, I downloaded it a week ago).
The manual says that:
*
If track_vars is enabled and register_globals is disabled, only members of
the global associative array $HTTP_SESSION_VARS can be registered as session
variables. The restored session variables will only be available in the
array $HTTP_SESSION_VARS.
*

I won't use $_SESSION cause it seems that is a bit buggy have a search
with google->user group "$_SESSION".

Anyway thanks for your interest,
Evan

"Erik Price" <[EMAIL PROTECTED]> ha scritto nel messaggio
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> On Tuesday, March 26, 2002, at 02:14  PM, Evan wrote:
>
> > Hi !!
> > I can't make this work:
> > PAGE 1:
> >  > $HTTP_SESSION_VARS["v_s"]=500;
> > ?>
> >
>
> I am probably wrong about this, but I thought that you could register
> session variables using this technique only if you are using PHP 4.1.x
> and you use the format:
>
> $_SESSION['v_s'] = 500;
>
>
>
>
>
> Erik
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>



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




Re: [PHP] [Session]

2002-03-26 Thread Evan

> Try using the same session variable.  Right now it looks like the first
one
> is "v_s" and the second is "s_v".  HTH.
Ops

I changed it butit doesn't work! :-((
:_(

Evan

"Brian Drexler" <[EMAIL PROTECTED]> ha scritto nel messaggio
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Try using the same session variable.  Right now it looks like the first
one
> is "v_s" and the second is "s_v".  HTH.
>
> Brian
>
> -Original Message-
> From: Evan [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 2:15 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] [Session]
>
>
> Hi !!
> I can't make this work:
> PAGE 1:
>  $HTTP_SESSION_VARS["v_s"]=500;
> ?>
> 
> 
> SESSION 1
> 
> 
>
> 
>
> Variabile settata? --
>  if (isset($HTTP_SESSION_VARS["v_s"])){
>  echo "si";
> }else{
>  echo "no";
> }
> ?>
> link to next
> 
> 
>
> In page 1 I create the session var and I check if it exists. The if stat
> returns YES so it seems everything's ok.
>
> PAGE 2:
> 
> 
> SESSION 2
> 
> 
>
> 
>  echo $HTTP_SESSION_VARS["s_v"];
> ?>
> 
> 
>
> In page 2 I simply read the session var but it doesn't return anything.
>
> I must leave register_globals = Off !
> What's wrong?
>
> Thanks,
> Evan
>
>
>
> --
> 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] [Session]

2002-03-26 Thread Erik Price


On Tuesday, March 26, 2002, at 02:14  PM, Evan wrote:

> Hi !!
> I can't make this work:
> PAGE 1:
>  $HTTP_SESSION_VARS["v_s"]=500;
> ?>
>

I am probably wrong about this, but I thought that you could register 
session variables using this technique only if you are using PHP 4.1.x 
and you use the format:

$_SESSION['v_s'] = 500;





Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] Array in a Loop Question

2002-03-26 Thread Erik Price


On Tuesday, March 26, 2002, at 02:12  PM, Jeff Hatcher wrote:

> So my question is how can I put this in the database without having to
> reassign my variable name?

You have to "jump out" of the quoted string that represents your SQL 
query when you echo the value of the $_POST variable.  Like this:

$sql = "SELECT a FROM b WHERE c='" . $_POST['d'] . "'";

Note that I 'jumped out' immediately after the singlequote mark (which 
you need if your value is going into a string field) by closing the 
double-quoted string, using the dot to append the value of the variable 
$_POST['d'], and then using a dot to append another double-quoted string 
(which contains nothing but a single quote in it).

Sometimes, depending on what your variable names look like, you can just 
escape your variable by using braces ('{' and '}'), but I think it's 
just easier to use the dot do appending from string to variable value to 
string again.




Erik






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




[PHP] OT Re: [PHP] Re: which php book 2 buy ?

2002-03-26 Thread Erik Price

Totally off topic --

I thought that O'Reilly had switched to using a white binding with black 
text on all of their newly-[re]printed books.  The picture of the 
sleeping babe with the book shows an older style, with a colored field 
(green) and white text.  Maybe this is a localization thing.


On Tuesday, March 26, 2002, at 01:51  PM, Rasmus Lerdorf wrote:

> Or, of course, if you want to be cool like Carl:
>
> http://lerdorf.com/buy/
>
> ;)
>







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




RE: [PHP] [Session]

2002-03-26 Thread Brian Drexler

Try using the same session variable.  Right now it looks like the first one
is "v_s" and the second is "s_v".  HTH.

Brian

-Original Message-
From: Evan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 2:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] [Session]


Hi !!
I can't make this work:
PAGE 1:



SESSION 1





Variabile settata? --

link to next



In page 1 I create the session var and I check if it exists. The if stat
returns YES so it seems everything's ok.

PAGE 2:


SESSION 2








In page 2 I simply read the session var but it doesn't return anything.

I must leave register_globals = Off !
What's wrong?

Thanks,
Evan



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

2002-03-26 Thread Evan

Hi !!
I can't make this work:
PAGE 1:



SESSION 1





Variabile settata? --

link to next



In page 1 I create the session var and I check if it exists. The if stat
returns YES so it seems everything's ok.

PAGE 2:


SESSION 2








In page 2 I simply read the session var but it doesn't return anything.

I must leave register_globals = Off !
What's wrong?

Thanks,
Evan



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




RE: [PHP] Array in a Loop Question

2002-03-26 Thread Jeff Hatcher

for ($i=0;$i<$_POST[count];$i++)
{
   echo $_POST['address' . $i] . '';
}

  Concanate array key 'address' with $i


This works fine and I also can do the address[] but my ultimate result
is to put this in the database. 
So address='$_POST['address' . $i]' fails and
address='$_POST[address][$i]' fails.

I can reassign the values to new variables i.e. $address =
$_POST['address' . $i]; DB Update address='$address'
Or
$address  $_POST[address][$i];  DB Update address='$address'

So my question is how can I put this in the database without having to
reassign my variable name?


Current Solution:
case "process1":
for ($i=0;$i<$_POST[count];$i++)
{
$postal=$_POST[postal1][$i] . " " .
$_POST[postal2][$i];
$state=$_POST[state][$i];
$address=$_POST[address][$i];
$email=$_POST[email][$i];
$city=$_POST[city][$i];
$customerid=$_POST[customerid][$i];

mssql_query("UPDATE customer SET
postal='$postal',state='$state',address='$address',email=$_POST['email'
. $i],city='$city' WHERE id='$customerid'") or die("DATABASE ERROR:
updating customer, residentchange process 1");
}

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




Re: [PHP] Array in a Loop Question

2002-03-26 Thread John Fishworld


Brilliant thanks !
I've got three of these in my form ! lol

> I think to get the results you are wanting, you might try this.
>
> 
> the address[]  tells the form that this element is an array and when
> submitted, will be converted into an indexed array on the process page.
>
> so you take this new array on the process page and do something like this.
>
>
> foreach($address AS $k => $v)
> {
> echo "$k : $v";
> }
>
> Jim Lucas
> www.bend.com
>
> - Original Message -
> From: "Jeff Hatcher" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, March 26, 2002 10:18 AM
> Subject: [PHP] Array in a Loop Question
>
>
> I have a form that gets repeated depending on number of members in a
> group(1 form surrounds all members). I separate the entries by assigning
> a count value to the names of the inputs (Ex.  name=address$count value=>). Does anyone know how I can pull the values
> back out of the $_POST[]?
>
> Example of ideal scenario that does not work:
> case "process1":
> for ($i=0;$i<$_POST[count];$i++)
> {
> $_POST[address$i]
> }
>
> --
> 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] Re: which php book 2 buy ?

2002-03-26 Thread Rick Emery

Amazon says it's not published yet.

So when

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 26, 2002 12:52 PM
To: Ralph Friedman
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: which php book 2 buy ?


Or, of course, if you want to be cool like Carl:

http://lerdorf.com/buy/

;)

-Rasmus

On Tue, 26 Mar 2002, Ralph Friedman wrote:

> In article <[EMAIL PROTECTED]>, Septic Flesh wrote:
> > I wanna buy a book from amazon . . .but don't know which one..
> > Do you know where I will find examples of shopping carts ? (which book
?)
> >
>
> "Creating Dynamic Web Pages Using PHP and MySQL" by David Tansley.
>
> --
> Rgds
> Ralph
>
>
>
> --
> 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] Re: [PHP-DB] how to get consistent UTC from gmmktime (w/o dst-offset) ????

2002-03-26 Thread DL Neil

BTW for all who are following this, Patrick has cleverly illustrated
that most of the northern hemisphere locations where summer time is
observed will 'spring forward' this weekend. Most of the southern
hemisphere locations that were in summer time did their 'fall back' last
weekend!
NB the two uses of the word "most"!


Hi Patrick,

References from the manual:
-
gmmktime -- Get UNIX timestamp for a GMT date
-
gmdate -- Format a GMT/CUT date/time

Identical to the date() function except that the time returned is
Greenwich Mean Time (GMT). For example, when run in Finland (GMT +0200),
the first line below prints "Jan 01 1998 00:00:00", while the second
prints "Dec 31 1997 22:00:00".
echo date ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
echo gmdate ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
-

The definition of the Unix Epoch is itself in GMT (and adjusted from
there to local time using the +/-TZ difference): "the current time
measured in the number of seconds since the Unix Epoch (January 1 1970
00:00:00 GMT)".

When playing around with UNIX epoch seconds it is important to keep them
time-zone separated. So try working your test backwards and putting in a
data/time and then asking for the GMT and the local timestamp values.
They will also be separated by the one hour/two hours.

Question answered, or in my haste to get to my dinner...?
Regards,
=dn



> i'm storing events in a mysql-db, using epoch timestamps to pinpoint
the
> exact date/time for an event.
>
> so far, I have been using localtime, being aware that there are
> inconsistencies
> in the number of epoch-seconds, when DST flips on and off.
nevertheless, that
> works fine as long as you stick to mktime() and date() for all the
date-math
> as in mktime(0,0,0,$month,$day+$offset,$year)
>
> but as soon as you leave php and have to do some calculation in
javascript,
> you will encounter functions that behave differently on the pc and mac
> platforms. so you have to revert back to the 'add 86400-seconds' to
calculate
> the next day.
>
> so I thought it would be nice to have all the timestamps as linear,
> non-dst-epoch-seconds (UTC) and I went into the gmmktime() and
gmdate()
> functions, assuming they would do the math in a linear second-based
timespace
> (in GMT, without DST). That seems to be the case for the output of
'gmdate',
> that remains correct, if you count up seconds across the DST boundary
(see
> second example).
>
> but it seems that there is no way to calculate the gmt-epoch for a
given
> date using gmmktime without having to add/subtract the TZ manually.
gmmktime
> will always take your local DST-settings into calculation and upon
conversion
> back with gmdate, you will be off by the number of hours of your
timezone.
> I thought gmmktime() would handle this as if the computer would be in
> Greenwich
> (TZ=0), which would then leave us with the two functions
encoding/decoding
> consistently.
>
> anyone having solved this properly?
>
> -
> print "count days:\n";
> for($day=0; $day<7; $day++){
> $timgmt = gmmktime(0,0,0,3,28+$day,2002);
> $timloc = mktime(0,0,0,3,28+$day,2002);
> print $timgmt . "= gmmktim epoch - " . gmdate("D d.m.Y H:i I",$timgmt)
.
> "\n";
> print $timloc . "= mktim epoch - " . date("D d.m.Y H:i  I",$timloc) .
> "\n";
> print "\n";
> }
>
> 
> count days:
> 101727= gmmktim epoch - Wed 27.03.2002 23:00 0
> 101727= mktim epoch - Thu 28.03.2002 00:00 0
>
> 1017356400= gmmktim epoch - Thu 28.03.2002 23:00 0
> 1017356400= mktim epoch - Fri 29.03.2002 00:00 0
>
> 1017442800= gmmktim epoch - Fri 29.03.2002 23:00 0
> 1017442800= mktim epoch - Sat 30.03.2002 00:00 0
>
> 1017529200= gmmktim epoch - Sat 30.03.2002 23:00 0
> 1017529200= mktim epoch - Sun 31.03.2002 00:00 0
> << 1017619200= gmmktim epoch - Mon 01.04.2002 00:00 0  <<< off by one
hour due to
> DST
> 1017612000= mktim epoch - Mon 01.04.2002 00:00 1
>
> 1017705600= gmmktim epoch - Tue 02.04.2002 00:00 0
> 1017698400= mktim epoch - Tue 02.04.2002 00:00 1
>
> 1017792000= gmmktim epoch - Wed 03.04.2002 00:00 0
> 1017784800= mktim epoch - Wed 03.04.2002 00:00 1
>
>
> -
> print "count seconds:\n";
> $baseepoch = $timloc = mktime(0,0,0,3,28,2002);
> for($day=0; $day<7; $day++){
> $epochnow = $baseepoch + (60 * 60 * 24 * $day);
> print $epochnow . "= gmmktim epoch - " . gmdate("D d.m.Y H:i
I",$epochnow) .
> "\n";
> print $epochnow . "= mktim epoch - " . date("D d.m.Y H:i
I",$epochnow) .
> "\n";
> print "\n";
> }
> 
> count seconds:
> 101727= gmmktim epoch - Wed 27.03.2002 23:00 0  <<< consistent,
but off by
> -1 (your TZ)
> 101727= mktim epoch - Thu 28.03.2002 00:00 0
>
> 1017356400= gmmktim epoch - Thu 28.03.2002 23:00 0
> 1017356400= mktim epoch - Fri 29.03.2002 00:00 0
>
> 1017442800= gmmktim epoch - Fri 29.03.2002 23:00 0
> 1017442800= mktim epoch - Sat 30.03.2002 00:00 0
>
> 1017529200= gmmktim epoch - Sat 30.03.2002 

Re: [PHP] Re: which php book 2 buy ?

2002-03-26 Thread Scott St. John

I didn't think Programming PHP was out yet?


On Tue, 26 Mar 2002, Rasmus Lerdorf wrote:

> Or, of course, if you want to be cool like Carl:
> 
> http://lerdorf.com/buy/
> 
> ;)
> 
> -Rasmus
> 
> On Tue, 26 Mar 2002, Ralph Friedman wrote:
> 
> > In article <[EMAIL PROTECTED]>, Septic Flesh wrote:
> > > I wanna buy a book from amazon . . .but don't know which one..
> > > Do you know where I will find examples of shopping carts ? (which book ?)
> > >
> >
> > "Creating Dynamic Web Pages Using PHP and MySQL" by David Tansley.
> >
> > --
> > Rgds
> > Ralph
> >
> >
> >
> > --
> > 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] Array in a Loop Question

2002-03-26 Thread Jim Lucas [php]

I think to get the results you are wanting, you might try this.


the address[]  tells the form that this element is an array and when
submitted, will be converted into an indexed array on the process page.

so you take this new array on the process page and do something like this.


foreach($address AS $k => $v)
{
echo "$k : $v";
}

Jim Lucas
www.bend.com

- Original Message -
From: "Jeff Hatcher" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 10:18 AM
Subject: [PHP] Array in a Loop Question


I have a form that gets repeated depending on number of members in a
group(1 form surrounds all members). I separate the entries by assigning
a count value to the names of the inputs (Ex. ). Does anyone know how I can pull the values
back out of the $_POST[]?

Example of ideal scenario that does not work:
case "process1":
for ($i=0;$i<$_POST[count];$i++)
{
$_POST[address$i]
}

--
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: which php book 2 buy ?

2002-03-26 Thread Rasmus Lerdorf

Or, of course, if you want to be cool like Carl:

http://lerdorf.com/buy/

;)

-Rasmus

On Tue, 26 Mar 2002, Ralph Friedman wrote:

> In article <[EMAIL PROTECTED]>, Septic Flesh wrote:
> > I wanna buy a book from amazon . . .but don't know which one..
> > Do you know where I will find examples of shopping carts ? (which book ?)
> >
>
> "Creating Dynamic Web Pages Using PHP and MySQL" by David Tansley.
>
> --
> Rgds
> Ralph
>
>
>
> --
> 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] Re: which php book 2 buy ?

2002-03-26 Thread Ralph Friedman

In article <[EMAIL PROTECTED]>, Septic Flesh wrote:
> I wanna buy a book from amazon . . .but don't know which one..
> Do you know where I will find examples of shopping carts ? (which book ?)
>

"Creating Dynamic Web Pages Using PHP and MySQL" by David Tansley.

-- 
Rgds
Ralph



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




Re: [PHP] Array Question

2002-03-26 Thread Jim Lucas [php]

I can make this just a little easier..  try this

$query = "SELECT * FROM mytable WHERE t_state_id_state in ('" .join("', '",
$state). "')";

if $state happens to be the name of the array that is passed from the
multi-select

Jim Lucas
www.bend.com
- Original Message -
From: "Rick Emery" <[EMAIL PROTECTED]>
To: "'John Fishworld'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 10:07 AM
Subject: RE: [PHP] Array Question


> $n =sizeof($state);
>
> $srch = "";
> while( $x=0; $x<$n; $x++)
> {
>... do something with array element $state[$x] ...
>$srch .= $state[$x].", ";
> }
> $srch = rtrim($srch,", ");
> $query = "SELECT * FROM mytable WHERE t_state_id_state in ($srch)";
>
> -Original Message-
> From: John Fishworld [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 11:51 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Array Question
>
>
> I have some multiple select boxes in a form
> ie
>  
>   all Regions 
>   Region19 
>   Region14
>   Region15
>
> these then get passed and I want to use them in mysql query
>
> blah blah
> WHERE
>   (t_state_id_state = $state[0])
>
> Whats the best way of finding out how many items are in my array ?
> And how can I step through the ones the exist ?
> And can I only use LIKE % when my value is all ?
>
> 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




Re: [PHP] Array in a Loop Question

2002-03-26 Thread Erik Price


On Tuesday, March 26, 2002, at 01:18  PM, Jeff Hatcher wrote:

> I have a form that gets repeated depending on number of members in a
> group(1 form surrounds all members). I separate the entries by assigning
> a count value to the names of the inputs (Ex.  name=address$count value=>). Does anyone know how I can pull the values
> back out of the $_POST[]?
>
> Example of ideal scenario that does not work:
>   case "process1":
>   for ($i=0;$i<$_POST[count];$i++)
>   {
>   $_POST[address$i]   
>   }

The initial form:

for ($i = 1; $i <= $_POST['count']; $i++) {
   print "\n";
}
print "

What the above loop does is it makes a number of address inputs equal to 
$count... if $count is equal to 3, then you will get






I changed your $i from 0 to 1 because it makes it mentally easier to 
work with (for me at least).

Now in your next script, which is the target of the form, here is what 
you want to have:

for ($i = 1; $i <= $_POST['count']; $i++) {
   // do some code with $_POST["address{$i}"], such as
   // entering it into a database or echoing it to the user in HTML
}

Some further notes -- the hidden form field was so that you could give 
the second script the "count" variable, so it knows how many loops to do 
(this value is otherwise not available to the second script).  Also, the 
use of doublequotes in the second script ($_POST["address{$i}"]) is 
imperative because with singlequotes the variable $i will not expand to 
$_POST["address2"] or whatever.

HTH,

Erik







Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


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




Re: [PHP] Array in a Loop Question

2002-03-26 Thread Julio Nobrega Trabalhando

for ($i=0;$i<$_POST[count];$i++)
{
   echo $_POST['address' . $i] . '';
}

  Concanate array key 'address' with $i

--

Julio Nobrega.

Um dia eu chego lá:
http://sourceforge.net/projects/toca

Ajudei? Salvei? Que tal um presentinho?
http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884


"Jeff Hatcher" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I have a form that gets repeated depending on number of members in a
group(1 form surrounds all members). I separate the entries by assigning
a count value to the names of the inputs (Ex. ). Does anyone know how I can pull the values
back out of the $_POST[]?

Example of ideal scenario that does not work:
case "process1":
for ($i=0;$i<$_POST[count];$i++)
{
$_POST[address$i]
}



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




Re: [PHP] Personal web server that runs PHP

2002-03-26 Thread John Fishworld

Also good http://www.omnicron.ca but not free !


> In fact, using Apache Win32 Module on a Windows 98 PC
> is a much better choice & option rather then PWS.
> Apache server gives greater flexibility & support.
>
> I don't see any reason why you should choose PWS over
> Apache Win32 for your Win 98 PC?
>
> T. Edison Jr.
>
>
> --- R'twick Niceorgaw <[EMAIL PROTECTED]> wrote:
> > u can use Apache on win 98 I believe ?
> >
> > - Original Message -
> > From: "Don" <[EMAIL PROTECTED]>
> > To: "php list" <[EMAIL PROTECTED]>
> > Sent: Tuesday, March 26, 2002 12:56 PM
> > Subject: [PHP] Personal web server that runs PHP
> >
> >
> > Hi,
> >
> > Does anyone know of a personal web server that I can
> > installon my Win 98
> > machine that supports PHP 4.x?
> >
> > Thanks,
> > Don
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> =
> Rahul S. Johari (Director)
> **
> Abraxas Technologies Inc.
> Homepage : http://www.abraxastech.com
> Email : [EMAIL PROTECTED]
> Tel : 91-4546512/4522124
> ***
>
> __
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards®
> http://movies.yahoo.com/
>
> --
> 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] Personal web server that runs PHP

2002-03-26 Thread Thomas Edison Jr.

In fact, using Apache Win32 Module on a Windows 98 PC
is a much better choice & option rather then PWS.
Apache server gives greater flexibility & support. 

I don't see any reason why you should choose PWS over
Apache Win32 for your Win 98 PC?

T. Edison Jr.


--- R'twick Niceorgaw <[EMAIL PROTECTED]> wrote:
> u can use Apache on win 98 I believe ?
> 
> - Original Message -
> From: "Don" <[EMAIL PROTECTED]>
> To: "php list" <[EMAIL PROTECTED]>
> Sent: Tuesday, March 26, 2002 12:56 PM
> Subject: [PHP] Personal web server that runs PHP
> 
> 
> Hi,
> 
> Does anyone know of a personal web server that I can
> installon my Win 98
> machine that supports PHP 4.x?
> 
> Thanks,
> Don
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Rahul S. Johari (Director)
**
Abraxas Technologies Inc.
Homepage : http://www.abraxastech.com
Email : [EMAIL PROTECTED]
Tel : 91-4546512/4522124
***

__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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




[PHP] Array in a Loop Question

2002-03-26 Thread Jeff Hatcher

I have a form that gets repeated depending on number of members in a
group(1 form surrounds all members). I separate the entries by assigning
a count value to the names of the inputs (Ex. ). Does anyone know how I can pull the values
back out of the $_POST[]?

Example of ideal scenario that does not work:
case "process1":
for ($i=0;$i<$_POST[count];$i++)
{
$_POST[address$i]   
}

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




[PHP] COSF needs members More Info

2002-03-26 Thread David Duong

COSF will be a CGI foundry that produces scripts from:

 - The existing projects of its members (which means if you have a project
in the works which was supposed to be finished a year ago right before you
started on the new one)
 - The Scripts which have been abandoned because the scripter lost his/her
interest in.
 - From the brain child of any of our members.

I am planning to make a CGI Open Source Foundry

We will start in stages.

After the Foundry is initially set-up we will begin to release scripts.

The main goal would be to improve our skills, start something and actually
finish it quickly and better than designed.

The CGI Open Source Foundry is designed to help Perl/PHP developers find
help and resources to improve the Open Source CGI community.  We plan to
have the CGI Open Source Foundry built by late-summer (refer to our
schedule).  We plan on using this site to share ideas, post news of our
progress on the foundry and various other projects, and recruit programmers.

We are looking for our first members to test and see if this is going to
work.
COSF will be producing Perl and/or PHP scripts for the open source
community, most under the GNU Public License, -their may be a few sold under
other licenses-.
This is how COSF will operate:
A developer will either start a project from his/her own projects or take up
an abandoned/dead project from http://sourceforge.net or other places on the
net.
The developer can assign other developers to help them organize the project.
The project then posts an entry on COSF's open projects board and uses
COSF's groupware tools to help them collaborate on the project.
The script is then distributed through COSF and where ever the developers
desire.

This was taken from the about page of the COSF site, so the formatting may
be a little off.




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




  1   2   >