[PHP] Regex Parsing

2004-12-05 Thread [ rswfire ]
I wish to improve upon my regular expression skills.  I am creating a journal
object that allows me to post my journals online, while at the same time
maintaining nine different levels of privacy.  For example, if I give a user
Level 3 access, then they would be able to see all parts of my entries marked
as Level 3 or below, but nothing above that.

Below is an example entry.  I'm not sure how to go about doing this.  My
experience with regular expressions is somewhat limited.  I could use a
statement like this:

ereg([LEVEL1].*[/LEVEL1], $Contents, $Match);

But if you look at the contents below, you'll see that there are two places
where [/LEVEL1] is at, so that statement will mark the entire page as Level
1, rather than just the first sentence, and the last sentence.

Plus, that statement won't really work.  I need a way to say:  Replace
[LEVEL1].*[/LEVEL1] with ###LEVEL1### and return the contents into an array
for me.  That way, in the second phase of parsing, I can either put the
string back into the page at exactly the same point, or I can put Level 1
Access Required - Log In instead.

Any help would be greatly appreciated.  Thank you in advance.


[LEVEL1]Level 1 Access Required to view this section of this entry.[/LEVEL1]

between levels

[LEVEL2]Level 2 Access Required to view this section of this entry.[/LEVEL2]

between levels

[LEVEL3]Level 3 Access Required to view this section of this entry.[/LEVEL3]

between levels

[LEVEL4]Level 4 Access Required to view this section of this entry.[/LEVEL4]

between levels

[LEVEL5]Level 5 Access Required to view this section of this entry.[/LEVEL5]

between levels

[LEVEL6]Level 6 Access Required to view this section of this entry.[/LEVEL6]

between levels

[LEVEL7]Level 7 Access Required to view this section of this entry.[/LEVEL7]

between levels

[LEVEL8]Level 8 Access Required to view this section of this entry.[/LEVEL8]

between levels

[LEVEL9]Level 9 Access Required to view this section of this entry.[/LEVEL9]

Between levels

[LEVEL1]Level 1 Access Required to view this section of this entry.[/LEVEL1]

between levels

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



[PHP] Re: Regex Parsing

2004-12-05 Thread [ rswfire ]
 preg_match_all('#\[LEVEL([0-9])\](.*)\[/LEVEL[0-9]]#Uim', $content,
$matches);


You make it look so easy, thanks!  That takes care of step one, but how do I
make it so everything in $content where there is a level set, is replaced
with ###LEVEL?###

Does #Uim tell it to only get the first [/LEVEL1] rather than going to the
bottom and getting the second?  I've always wondered how to tell it to get
the first, rather than the last...

Thanks in advance!

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



[PHP] Regular Expression: Markup Code

2004-09-13 Thread [ rswfire ]
Hello, would someone please help me with my regular expressions?  They are so
complex!

 

Here is what I need to do.  I have a string with contents similar to the
following:

 

BLOCK NAME=TOP

 

   (a bunch of markup code)

 

/BLOCK

 

 

BLOCK NAME=BOTTOM

 

(a bunch of markup code)

 

/BLOCK

 


BLOCK NAME=WAYOVERHERE

 

(a bunch of markup code)

 

/BLOCK

 

 

In other words, the name of the block is not known at runtime.  They could be
anything really!

 

I need a way to parse through this string, and make new strings with names
like $TOP, $BOTTOM, $WAYOVERHERE, that contain their markup code, but not the
BLOCK tags.

 

Any help would be greatly appreciated!

 

-Samuel

 

 

 



[PHP] form posting to a fake page

2002-04-17 Thread [ rswfire ]

I am having a problem with posted variables showing up on a redirected 
page...

When someone access the page www.mydomain.com/mypage.html - it does not 
actually exist so my 404 errordocument is called (which is the root 
index.php file) - the index.php file knows what to do and creates an 
appropriate page - my entire network works in this fashion.

Unfortunately, if someone completes a form, the posted variables do not seem 
to show up.  I'm not sure what I can do about this.  I cannot redesign my 
entire network because of this one problem - does any one have any 
suggestions?

-rsw

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




RE: [PHP] form posting to a fake page

2002-04-17 Thread [ rswfire ]

Yes it works fine if I access it directly from index.php.  The action 
property is set appropriately.  I believe the problem lies in the fact that 
it is redirected in the background because the page is not real, so I'm 
assuming it is an Apache behaviour as opposed to a PHP limitation.


Original Message Follows
From: SHEETS,JASON (Non-HP-Boise,ex1) [EMAIL PROTECTED]
To: '[ rswfire ]' [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: [PHP] form posting to a fake page
Date: Wed, 17 Apr 2002 15:29:56 -0400

I assume form works correctly if you go directly to your index page.

You need to show us the html code for your form.  Make sure your action=
is set properly.

If you are using PHP you need to show relevant code.

Please be more specific about your domain, www.mydomain.com/mypage.html does
not allow anyone to go to the site and view the behavior or view your html
to make sure everything is ok.

Jason

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 1:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] form posting to a fake page


I am having a problem with posted variables showing up on a redirected
page...

When someone access the page www.mydomain.com/mypage.html - it does not
actually exist so my 404 errordocument is called (which is the root
index.php file) - the index.php file knows what to do and creates an
appropriate page - my entire network works in this fashion.

Unfortunately, if someone completes a form, the posted variables do not seem

to show up.  I'm not sure what I can do about this.  I cannot redesign my
entire network because of this one problem - does any one have any
suggestions?

-rsw

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




RE: [PHP] form posting to a fake page

2002-04-17 Thread [ rswfire ]

See, now that makes sense.  So it sounds like there's really nothing that 
can be done except to have it post directly to the index.php file along with 
an environment variable indicating what page is posting the data.  This is 
what I have been doing as a workaround already, it's just not the ideal 
solution.  Thank you.


Original Message Follows
From: Jaime Bozza [EMAIL PROTECTED]
To: '[ rswfire ]' [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: RE: [PHP] form posting to a fake page
Date: Wed, 17 Apr 2002 14:46:23 -0500

Actually, I believe this is a browser problem.  The browser does not
resubmit POST data after a redirect (302 returned), so your final page
never sees the data.  I had a similar problem where I was redirecting in
certain cases and could never get the POST data to come up on the final
page.

(Testing this with both IE and Netscape)


Jaime Bozza


-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 2:36 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] form posting to a fake page


Yes it works fine if I access it directly from index.php.  The action
property is set appropriately.  I believe the problem lies in the fact
that
it is redirected in the background because the page is not real, so I'm
assuming it is an Apache behaviour as opposed to a PHP limitation.


Original Message Follows
From: SHEETS,JASON (Non-HP-Boise,ex1) [EMAIL PROTECTED]
To: '[ rswfire ]' [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: [PHP] form posting to a fake page
Date: Wed, 17 Apr 2002 15:29:56 -0400

I assume form works correctly if you go directly to your index page.

You need to show us the html code for your form.  Make sure your
action=
is set properly.

If you are using PHP you need to show relevant code.

Please be more specific about your domain, www.mydomain.com/mypage.html
does
not allow anyone to go to the site and view the behavior or view your
html
to make sure everything is ok.

Jason

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 1:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] form posting to a fake page


I am having a problem with posted variables showing up on a redirected
page...

When someone access the page www.mydomain.com/mypage.html - it does not
actually exist so my 404 errordocument is called (which is the root
index.php file) - the index.php file knows what to do and creates an
appropriate page - my entire network works in this fashion.

Unfortunately, if someone completes a form, the posted variables do not
seem

to show up.  I'm not sure what I can do about this.  I cannot redesign
my
entire network because of this one problem - does any one have any
suggestions?

-rsw

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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







_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: [PHP] form posting to a fake page

2002-04-17 Thread [ rswfire ]

It would still require some knowledge of the posted data.  If someone clicks 
a submit button, and it is posting to a page that doesn't really exist, then 
when the index.php file gets called as a 404 errordocument, the posted 
variables are already lost, so it wouldn't be possible to access the posted 
variables in any fashion.  The only possibility might be if Apache had some 
way of dealing with this scenario and I am not that familiar with how Apache 
works.  And so, that leaves me with the only workaround I do know, post to a 
page that does exist!  It's just not the ideal solution, but it works.


Original Message Follows
From: Erik Price [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] form posting to a fake page
Date: Wed, 17 Apr 2002 15:53:55 -0400


On Wednesday, April 17, 2002, at 03:49  PM, [ rswfire ] wrote:

See, now that makes sense.  So it sounds like there's really nothing
that can be done except to have it post directly to the index.php file
along with an environment variable indicating what page is posting the
data.  This is what I have been doing as a workaround already, it's
just not the ideal solution.  Thank you.

You could pass the data along the querystring, maybe.  I'm not sure how
the redirect works exactly, but if you are using PHP or Perl then you
should be able to grab the GET and POST data and throw it onto the
querystring.


Erik






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





_
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] form posting to a fake page

2002-04-17 Thread [ rswfire ]

$_POST[] variables do not exist on a redirected page; that's the problem!

Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] form posting to a fake page
Date: Wed, 17 Apr 2002 15:56:32 -0500 (CDT)

On Wed, 17 Apr 2002, [ rswfire ] wrote:
  It would still require some knowledge of the posted data.  If someone 
clicks
  a submit button, and it is posting to a page that doesn't really exist, 
then
  when the index.php file gets called as a 404 errordocument, the posted
  variables are already lost, so it wouldn't be possible to access the 
posted
  variables in any fashion.  The only possibility might be if Apache had 
some
  way of dealing with this scenario and I am not that familiar with how 
Apache
  works.  And so, that leaves me with the only workaround I do know, post 
to a
  page that does exist!  It's just not the ideal solution, but it works.

Well, depending on the quantity of posted data, you could go through
$_POST[] and turn them into GET args and pass them along to the
appropriate page (not that I really understand what you're trying to do).

miguel





_
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] form posting to a fake page

2002-04-17 Thread [ rswfire ]

No, the error handler does not have access to the posted data.  The problem 
in a nutshell:

1. Person fills out form; clicks submit

2. Form action property is called; server notices the page is not real

(Data is lost here)

3. Error handler is called


Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] form posting to a fake page
Date: Wed, 17 Apr 2002 16:00:17 -0500 (CDT)

Your error handler would read them and then construct a redirect
containing the form data in querystring format.

miguel

On Wed, 17 Apr 2002, [ rswfire ] wrote:
  $_POST[] variables do not exist on a redirected page; that's the problem!
 
  Original Message Follows
  From: Miguel Cruz [EMAIL PROTECTED]
  To: [ rswfire ] [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED]
  Subject: Re: [PHP] form posting to a fake page
  Date: Wed, 17 Apr 2002 15:56:32 -0500 (CDT)
 
  On Wed, 17 Apr 2002, [ rswfire ] wrote:
It would still require some knowledge of the posted data.  If someone
  clicks
a submit button, and it is posting to a page that doesn't really 
exist,
  then
when the index.php file gets called as a 404 errordocument, the posted
variables are already lost, so it wouldn't be possible to access the
  posted
variables in any fashion.  The only possibility might be if Apache had
  some
way of dealing with this scenario and I am not that familiar with how
  Apache
works.  And so, that leaves me with the only workaround I do know, 
post
  to a
page that does exist!  It's just not the ideal solution, but it works.
 
  Well, depending on the quantity of posted data, you could go through
  $_POST[] and turn them into GET args and pass them along to the
  appropriate page (not that I really understand what you're trying to do).
 
  miguel
 
 
 
 
 
  _
  Chat with friends online, try MSN Messenger: http://messenger.msn.com
 
 





_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Re: [PHP] form posting to a fake page (another idea)

2002-04-17 Thread [ rswfire ]

I'm not trying to make the page redirect anywhere.  I'm trying to create the 
illusion of there being many pages when there is only one doing all the 
work.

For example:

http://hsdnetwork.swifte.net/technicians.html

The page, technicians.html, does not really exist.  The server knows this 
and so calls(redirects) the root index.php file.  Why must it redirect?  Why 
can't Apache just substitute the index.php file without doing anything 
else??  That's the real problem!  If it did that, the posted variables would 
be available.

If you click the submit button on this page, you will see what I have had to 
do to get around this.  The action property is set to 
index.php?login=attemptpage=/technicians.html when I would like the 
action property to be ?login=attempt.

This really shouldn't be so complicated!  :-)


Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] form posting to a fake page
Date: Wed, 17 Apr 2002 16:00:17 -0500 (CDT)

Your error handler would read them and then construct a redirect
containing the form data in querystring format.

miguel

On Wed, 17 Apr 2002, [ rswfire ] wrote:
  $_POST[] variables do not exist on a redirected page; that's the problem!
 
  Original Message Follows
  From: Miguel Cruz [EMAIL PROTECTED]
  To: [ rswfire ] [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED]
  Subject: Re: [PHP] form posting to a fake page
  Date: Wed, 17 Apr 2002 15:56:32 -0500 (CDT)
 
  On Wed, 17 Apr 2002, [ rswfire ] wrote:
It would still require some knowledge of the posted data.  If someone
  clicks
a submit button, and it is posting to a page that doesn't really 
exist,
  then
when the index.php file gets called as a 404 errordocument, the posted
variables are already lost, so it wouldn't be possible to access the
  posted
variables in any fashion.  The only possibility might be if Apache had
  some
way of dealing with this scenario and I am not that familiar with how
  Apache
works.  And so, that leaves me with the only workaround I do know, 
post
  to a
page that does exist!  It's just not the ideal solution, but it works.
 
  Well, depending on the quantity of posted data, you could go through
  $_POST[] and turn them into GET args and pass them along to the
  appropriate page (not that I really understand what you're trying to do).
 
  miguel
 
 
 
 
 
  _
  Chat with friends online, try MSN Messenger: http://messenger.msn.com
 
 





_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




Re: [PHP] form posting to a fake page (another idea)

2002-04-17 Thread [ rswfire ]


I'm really not good with the ereg stuff; I wouldn't even know where to 
start.  It's really quite simple what I need to have happen.

*.DOMAIN.COM/*.* needs to access /index.php

My network handles multiple domains/subdomains; so it's important it can 
work with them all.  Any ideas?


Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] form posting to a fake page (another idea)
Date: Wed, 17 Apr 2002 16:29:40 -0500 (CDT)

Have a look at http://httpd.apache.org/docs/misc/rewriteguide.html which
gives countless examples of using mod_rewrite rules for this sort of
thing.

You can direct all requests to a single page and then let that page sort
things out as it pleases.

These are processed internal to the server without redirects (unless you
want to use a redirect) and POST data is preserved.

miguel

On Wed, 17 Apr 2002, [ rswfire ] wrote:
  I'm not trying to make the page redirect anywhere.  I'm trying to create 
the
  illusion of there being many pages when there is only one doing all the
  work.
 
  For example:
 
  http://hsdnetwork.swifte.net/technicians.html
 
  The page, technicians.html, does not really exist.  The server knows this
  and so calls(redirects) the root index.php file.  Why must it redirect?  
Why
  can't Apache just substitute the index.php file without doing anything
  else??  That's the real problem!  If it did that, the posted variables 
would
  be available.
 
  If you click the submit button on this page, you will see what I have had 
to
  do to get around this.  The action property is set to
  index.php?login=attemptpage=/technicians.html when I would like the
  action property to be ?login=attempt.
 
  This really shouldn't be so complicated!  :-)
 
 
  Original Message Follows
  From: Miguel Cruz [EMAIL PROTECTED]
  To: [ rswfire ] [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED]
  Subject: Re: [PHP] form posting to a fake page
  Date: Wed, 17 Apr 2002 16:00:17 -0500 (CDT)
 
  Your error handler would read them and then construct a redirect
  containing the form data in querystring format.
 
  miguel
 
  On Wed, 17 Apr 2002, [ rswfire ] wrote:
$_POST[] variables do not exist on a redirected page; that's the 
problem!
   
Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] form posting to a fake page
Date: Wed, 17 Apr 2002 15:56:32 -0500 (CDT)
   
On Wed, 17 Apr 2002, [ rswfire ] wrote:
  It would still require some knowledge of the posted data.  If 
someone
clicks
  a submit button, and it is posting to a page that doesn't really
  exist,
then
  when the index.php file gets called as a 404 errordocument, the 
posted
  variables are already lost, so it wouldn't be possible to access 
the
posted
  variables in any fashion.  The only possibility might be if Apache 
had
some
  way of dealing with this scenario and I am not that familiar with 
how
Apache
  works.  And so, that leaves me with the only workaround I do know,
  post
to a
  page that does exist!  It's just not the ideal solution, but it 
works.
   
Well, depending on the quantity of posted data, you could go through
$_POST[] and turn them into GET args and pass them along to the
appropriate page (not that I really understand what you're trying to 
do).
   
miguel
   
   
   
   
   
_
Chat with friends online, try MSN Messenger: http://messenger.msn.com
   
   
 
 
 
 
 
  _
  Get your FREE download of MSN Explorer at 
http://explorer.msn.com/intl.asp.
 
 
 





_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




[PHP] Would this work? (mod_rewrite)

2002-04-17 Thread [ rswfire ]

Assume I want *.domain.*/*.* to automatically call index.php (without the 
user knowing and without any redirecting at all):

RewriteEngine  on
RewriteBase/
RewriteRule*.* index.php [R]

I don't know what in the world the [R] is, but it's in almost all of the 
mod_rewrite examples...  :-)

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




[PHP] sorry i forgot something

2002-04-17 Thread [ rswfire ]

*.domain.*/*.* AUTOMATICALLY goes to the root of my web (my isp set this up 
for me)

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: [PHP] Would this work? (mod_rewrite)

2002-04-17 Thread [ rswfire ]

Miguel, if I get this working I am going to be so happy  :-)

I just tried putting the following in an .htaccess file in my root:

RewriteEngine  on
RewriteBase/
RewriteRule* index.php

And it came back with a server misconfiguration.  So, did I do something 
wrong?


Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Would this work?  (mod_rewrite)
Date: Wed, 17 Apr 2002 16:55:33 -0500 (CDT)

On Wed, 17 Apr 2002, [ rswfire ] wrote:
  Assume I want *.domain.*/*.* to automatically call index.php (without the
  user knowing and without any redirecting at all):
 
  RewriteEngine  on
  RewriteBase/
  RewriteRule*.* index.php [R]
 
  I don't know what in the world the [R] is, but it's in almost all of the
  mod_rewrite examples...  :-)

RewriteRule * index.php

Don't use the [R] - that tells it to create an external redirect. It's
used in many of the examples because in many real-world cases people are
using rewrite rules to coax invalid URLs into valid ones, and this way
there's at least some chance that the bad ones will get updated.

miguel





_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




Re: [PHP] Would this work? (mod_rewrite)

2002-04-17 Thread [ rswfire ]

mod_bwlimited, mod_php4, mod_log_bytes, mod_frontpage, mod_ssl, 
mod_setenvif, mod_so, mod_auth, mod_access, mod_rewrite, mod_alias, 
mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, 
mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, 
mod_log_config, mod_env, http_core


Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Would this work?  (mod_rewrite)
Date: Wed, 17 Apr 2002 16:55:33 -0500 (CDT)

On Wed, 17 Apr 2002, [ rswfire ] wrote:
  Assume I want *.domain.*/*.* to automatically call index.php (without the
  user knowing and without any redirecting at all):
 
  RewriteEngine  on
  RewriteBase/
  RewriteRule*.* index.php [R]
 
  I don't know what in the world the [R] is, but it's in almost all of the
  mod_rewrite examples...  :-)

RewriteRule * index.php

Don't use the [R] - that tells it to create an external redirect. It's
used in many of the examples because in many real-world cases people are
using rewrite rules to coax invalid URLs into valid ones, and this way
there's at least some chance that the bad ones will get updated.

miguel





_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




[PHP] mod_rewrite

2002-04-17 Thread [ rswfire ]

.htaccess  (returns 500 misconfiguration error message)
{

RewriteEngine  on
RewriteBase/
RewriteRule* index.php

}

http://swifte.net/phpinfo.php

(i did not use braces in the .htaccess file)

_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




Re: [PHP] Would this work? (mod_rewrite)

2002-04-17 Thread [ rswfire ]


[Wed Apr 17 18:04:19 2002] [alert] [client 172.131.190.148] 
/home/swiften/public_html/.htaccess: RewriteRule: cannot compile regular 
expression '*'


Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Would this work? (mod_rewrite)
Date: Wed, 17 Apr 2002 17:14:13 -0500 (CDT)

Do you have access to your server's error_log file? With any luck there'll
be a more informative message there (something like Miguel was too lazy
to pay sufficient attention to the following Rewrite caveat: xxx).

miguel

On Wed, 17 Apr 2002, [ rswfire ] wrote:

  mod_bwlimited, mod_php4, mod_log_bytes, mod_frontpage, mod_ssl,
  mod_setenvif, mod_so, mod_auth, mod_access, mod_rewrite, mod_alias,
  mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
  mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime,
  mod_log_config, mod_env, http_core
 
 
  Original Message Follows
  From: Miguel Cruz [EMAIL PROTECTED]
  To: [ rswfire ] [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED]
  Subject: Re: [PHP] Would this work?  (mod_rewrite)
  Date: Wed, 17 Apr 2002 16:55:33 -0500 (CDT)
 
  On Wed, 17 Apr 2002, [ rswfire ] wrote:
Assume I want *.domain.*/*.* to automatically call index.php (without 
the
user knowing and without any redirecting at all):
   
RewriteEngine  on
RewriteBase/
RewriteRule*.* index.php [R]
   
I don't know what in the world the [R] is, but it's in almost all of 
the
mod_rewrite examples...  :-)
 
  RewriteRule * index.php
 
  Don't use the [R] - that tells it to create an external redirect. It's
  used in many of the examples because in many real-world cases people are
  using rewrite rules to coax invalid URLs into valid ones, and this way
  there's at least some chance that the bad ones will get updated.
 
  miguel
 
 
 
 
 
  _
  Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 
 





_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Re: [PHP] Would this work? (mod_rewrite)

2002-04-17 Thread [ rswfire ]

This rewrite thing will actually be very good for me; my error log file will 
stop having a million file not found errors  :-)

I have to tell you guys, I love JTL Networks.  They are the best host I have 
ever had ever!


Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Would this work? (mod_rewrite)
Date: Wed, 17 Apr 2002 17:14:13 -0500 (CDT)

Do you have access to your server's error_log file? With any luck there'll
be a more informative message there (something like Miguel was too lazy
to pay sufficient attention to the following Rewrite caveat: xxx).

miguel

On Wed, 17 Apr 2002, [ rswfire ] wrote:

  mod_bwlimited, mod_php4, mod_log_bytes, mod_frontpage, mod_ssl,
  mod_setenvif, mod_so, mod_auth, mod_access, mod_rewrite, mod_alias,
  mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
  mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime,
  mod_log_config, mod_env, http_core
 
 
  Original Message Follows
  From: Miguel Cruz [EMAIL PROTECTED]
  To: [ rswfire ] [EMAIL PROTECTED]
  CC: [EMAIL PROTECTED]
  Subject: Re: [PHP] Would this work?  (mod_rewrite)
  Date: Wed, 17 Apr 2002 16:55:33 -0500 (CDT)
 
  On Wed, 17 Apr 2002, [ rswfire ] wrote:
Assume I want *.domain.*/*.* to automatically call index.php (without 
the
user knowing and without any redirecting at all):
   
RewriteEngine  on
RewriteBase/
RewriteRule*.* index.php [R]
   
I don't know what in the world the [R] is, but it's in almost all of 
the
mod_rewrite examples...  :-)
 
  RewriteRule * index.php
 
  Don't use the [R] - that tells it to create an external redirect. It's
  used in many of the examples because in many real-world cases people are
  using rewrite rules to coax invalid URLs into valid ones, and this way
  there's at least some chance that the bad ones will get updated.
 
  miguel
 
 
 
 
 
  _
  Send and receive Hotmail on your mobile device: http://mobile.msn.com
 
 
 





_
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] Would this work? (mod_rewrite)

2002-04-17 Thread [ rswfire ]

Well, it's half working  :-(

But now I am receiving a 404 error message and the following message in my 
error log:

[Wed Apr 17 18:31:26 2002] [error] [client 172.131.190.148] File does not 
exist: /home/swiften/public_html/404.shtml

[Wed Apr 17 18:31:26 2002] [error] [client 172.131.190.148] File does not 
exist: /home/swiften/public_html/technicians.html

The 404.shtml thing has to do with my ISP.  I think that one's out of my 
control; so is there a work around so it does not try to find that file??


Original Message Follows
From: SHEETS,JASON (Non-HP-Boise,ex1) [EMAIL PROTECTED]
To: '[ rswfire ]' [EMAIL PROTECTED], [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: RE: [PHP] Would this work? (mod_rewrite)
Date: Wed, 17 Apr 2002 18:29:25 -0400

And I fall victim to my own stupidity/cache again.

You actually want


RewriteEngine on
RewriteBase /
RewriteRule ^$ index.php

This works for me on my domain, you can check it out by going to
http://demo.shadotechdesigns.com and http://bug.shadonet.com

Jason

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 4:20 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Would this work? (mod_rewrite)


This rewrite thing will actually be very good for me; my error log file will

stop having a million file not found errors  :-)

I have to tell you guys, I love JTL Networks.  They are the best host I have

ever had ever!


Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Would this work? (mod_rewrite)
Date: Wed, 17 Apr 2002 17:14:13 -0500 (CDT)

Do you have access to your server's error_log file? With any luck there'll
be a more informative message there (something like Miguel was too lazy
to pay sufficient attention to the following Rewrite caveat: xxx).

miguel

On Wed, 17 Apr 2002, [ rswfire ] wrote:

   mod_bwlimited, mod_php4, mod_log_bytes, mod_frontpage, mod_ssl,
   mod_setenvif, mod_so, mod_auth, mod_access, mod_rewrite, mod_alias,
   mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
   mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime,
   mod_log_config, mod_env, http_core
  
  
   Original Message Follows
   From: Miguel Cruz [EMAIL PROTECTED]
   To: [ rswfire ] [EMAIL PROTECTED]
   CC: [EMAIL PROTECTED]
   Subject: Re: [PHP] Would this work?  (mod_rewrite)
   Date: Wed, 17 Apr 2002 16:55:33 -0500 (CDT)
  
   On Wed, 17 Apr 2002, [ rswfire ] wrote:
 Assume I want *.domain.*/*.* to automatically call index.php (without
the
 user knowing and without any redirecting at all):

 RewriteEngine  on
 RewriteBase/
 RewriteRule*.* index.php [R]

 I don't know what in the world the [R] is, but it's in almost all of
the
 mod_rewrite examples...  :-)
  
   RewriteRule * index.php
  
   Don't use the [R] - that tells it to create an external redirect. It's
   used in many of the examples because in many real-world cases people are
   using rewrite rules to coax invalid URLs into valid ones, and this way
   there's at least some chance that the bad ones will get updated.
  
   miguel
  
  
  
  
  
   _
   Send and receive Hotmail on your mobile device: http://mobile.msn.com
  
  
  





_
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




_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




[PHP] mod_rewrite (the solution)

2002-04-17 Thread [ rswfire ]

RewriteEngine  on
RewriteBase/
RewriteRule$.* index.php


Original Message Follows
From: SHEETS,JASON (Non-HP-Boise,ex1) [EMAIL PROTECTED]
To: '[ rswfire ]' [EMAIL PROTECTED], [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: RE: [PHP] Would this work? (mod_rewrite)
Date: Wed, 17 Apr 2002 18:29:25 -0400

And I fall victim to my own stupidity/cache again.

You actually want


RewriteEngine on
RewriteBase /
RewriteRule ^$ index.php

This works for me on my domain, you can check it out by going to
http://demo.shadotechdesigns.com and http://bug.shadonet.com

Jason

-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 4:20 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Would this work? (mod_rewrite)


This rewrite thing will actually be very good for me; my error log file will

stop having a million file not found errors  :-)

I have to tell you guys, I love JTL Networks.  They are the best host I have

ever had ever!


Original Message Follows
From: Miguel Cruz [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Would this work? (mod_rewrite)
Date: Wed, 17 Apr 2002 17:14:13 -0500 (CDT)

Do you have access to your server's error_log file? With any luck there'll
be a more informative message there (something like Miguel was too lazy
to pay sufficient attention to the following Rewrite caveat: xxx).

miguel

On Wed, 17 Apr 2002, [ rswfire ] wrote:

   mod_bwlimited, mod_php4, mod_log_bytes, mod_frontpage, mod_ssl,
   mod_setenvif, mod_so, mod_auth, mod_access, mod_rewrite, mod_alias,
   mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
   mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime,
   mod_log_config, mod_env, http_core
  
  
   Original Message Follows
   From: Miguel Cruz [EMAIL PROTECTED]
   To: [ rswfire ] [EMAIL PROTECTED]
   CC: [EMAIL PROTECTED]
   Subject: Re: [PHP] Would this work?  (mod_rewrite)
   Date: Wed, 17 Apr 2002 16:55:33 -0500 (CDT)
  
   On Wed, 17 Apr 2002, [ rswfire ] wrote:
 Assume I want *.domain.*/*.* to automatically call index.php (without
the
 user knowing and without any redirecting at all):

 RewriteEngine  on
 RewriteBase/
 RewriteRule*.* index.php [R]

 I don't know what in the world the [R] is, but it's in almost all of
the
 mod_rewrite examples...  :-)
  
   RewriteRule * index.php
  
   Don't use the [R] - that tells it to create an external redirect. It's
   used in many of the examples because in many real-world cases people are
   using rewrite rules to coax invalid URLs into valid ones, and this way
   there's at least some chance that the bad ones will get updated.
  
   miguel
  
  
  
  
  
   _
   Send and receive Hotmail on your mobile device: http://mobile.msn.com
  
  
  





_
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




_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




[PHP] mod_rewrite

2002-04-17 Thread [ rswfire ]

I could really use your help with this.  The examples I have received from 
everyone thus far have not worked, including the last one that you posted.  
This is the situation:

I have multiple domains, each with multiple subdomains, all of which 
automatically point to the root of my web environment.  I have only one file 
that does all of the work for all of these websites/webpages, and that is 
the index.php file in the root.  This file is smart enough to parse the url 
being accessed and create an appropriate page based on a very complex set of 
rules.

Originally, I was using the ErrorDocument 404 to make it access the 
index.php file, but this has some inherent flaws.  The biggest problem was 
that forms that were being posted to a page that doesn't really exist never 
maintained the posted variables (due to the 404 redirect.)  Another 
limitation was that it just created a bunch of unnecessary error messages in 
my error log since there are no real pages on my network, even though it 
pretends there is.

So, I need to use mod_rewrite.  That is apparent now.  The problem is I know 
nothing about creating regular expressions.  I simply need it to rewrite the 
url for any file that does not exist (it should not try to do so for a file 
that really does exist, say an image file) and it needs to have the 
following rule:

A*.B*.C*/D*.E*

Where A is a subdomain; B is the domain name; C is the top level domain; D/E 
are a file or directory.

Some examples would be:

http://www.swifte.net/
http://www.cao.swifte.net/petition-sign.html
http://hsdnetwork.swifte.net/technicians.html
http://www.hsdnetwork.swifte.net/technicians.html
http://www.caofund.org/
http://www.hsdnetwork.com/

Can you tell me how to do this?  I would appreciate your help so much!!

-Samuel

_
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




[PHP] mod_rewrite (solution)

2002-04-17 Thread [ rswfire ]

Thanks to everyone who tried to help.  Apparently, I'm better at this stuff 
than I thought.  The four lines below provide the perfect solution to the 
problem I was having.

RewriteEngine  on
RewriteBase/
RewriteCond%{REQUEST_FILENAME} !-f
RewriteRule^(.+) /index.php



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




[PHP] [ Variable Problems ]

2002-04-15 Thread [ rswfire ]



I have created a website that works somewhat uniquely.  Every page is 
created using the root index.php file.   I have an .htaccess document that 
redirects all 404 errors to this index.php file.

So if someone access www.mydomain.com/mypage.html the index.php file is 
called and knows what to do.  The problem I am having is that it throws off 
all of the variables in PHP.  First of all, if the page is called using a 
form the POST variables are not posted.  Secondly, included files do not 
seem to be able to access global variables in the same way.

What can I do

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




[PHP] Sending Files to a Remote User

2002-01-26 Thread [ rswfire ]

Hello,

I am creating dynamic CSV files using PHP, and currently these files are 
being saved on the server, but I would like to send them directly to the 
user who requested the file, similar to what phpMyAdmin does.  I looked at 
the source for phpMyAdmin and it was a bit complicated.  I was hoping there 
was a simpler solution to my problem.  Any suggestions?  Please email me 
directly, I'm not on the mailing list.  Thank you.

-Samuel


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




[PHP] Dynamic Document Creation

2001-12-07 Thread [ rswfire ]

Hello,

Does anyone have any scripts or know a location to point me to where I can 
dynamically create Microsoft Word documents using PHP.  I need to create 
some nicely formatted forms.  I could do this as text, however, this 
solution is not perfect because I don't know of an escape sequence for 
creating a new page.  I cannot do this using PDF because it's not installed 
on the servers I am using.  I could possibly do this in other formats if you 
know of any solutions.  Thank you.

rswfire

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


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




[PHP] [ Swift eNetwork ] Matrix

2001-04-11 Thread [ rswfire ]

[  I will never again repeat this message to the PHP Mailing List out 
of courtesy for all of the respected members of this list.  For those 
of you whom take the time to read this email, thank you, and I hope you 
find its contents useful to your present and future endeavors...  ]

http://matrix.swifte.net/



Hello!!

My name is Robert S. White.  Today's my 24th birthday.  Birthdays are 
special to me, so today has already turned out to be very exciting.
However, today holds an even greater significance for me than the 
passing of another year.  Today, I am officially launching the 
completion of a two-year development project to the world, Swift 
eNetwork.  I am offering an innovative new service to the Internet 
market and communities, one that I believe could potentially benefit 
many members of the PHP community.



So, what is Swift eNetwork?  

Swift eNetwork is an international networking resource for businesses, 
organizations, groups, and individuals of diverse backgrounds and 
interests.

I know, that's a pretty mundane definition.  The depth and complexities 
of Swift eNetwork run very deeply.  And the advantages of having a web 
presence at Swift eNetwork are plentiful.

Building your website at Swift eNetwork is a simple process.  From your 
Client Control Panel, you have access to all of the tools and resources 
you need to maintain a professional and dynamic web presence online.



How does Swift eNetwork work for you?  

- Creates a dynamic and professional web presence to you and your 
visitors.

- Provides you with visitors best served by your business or 
organization.

- Allows easy customization of your website without the complicated 
process of programming.  (Unless, of course, you like to program, and 
that option is available too... :)

- Provides easy access to a diverse set of tools geared toward your 
business or organizational needs.



What are the resources and tools available to you?  

- Client Control Panel
- Real-Time Account Information
- Website Wizard
- Webmaster Mailbox
- Website Statistics  Analysis
- Website Maintenance
- Online Self-Help Library
- Around-The-Clock Technical Support
- Advertising  Marketing Essentials
- Applications (Plugins)



How does Swift eNetwork relate to the PHP community?

Well, on several levels actually.

First of all, Swift eNetwork is powered by all open source 
technologies:  Linux, Apache, PHP, MySQL.

Secondly, Swift eNetwork is powered by its own class-oriented language, 
eNetwizard.  I designed eNetwizard using PHP and MySQL.  Included with 
eNetwizard is an extensive core library, each class (there's about 
twenty so far) handling a specific function of the network.  eNetwizard 
also includes an extensive and ever-growing library of plugin 
applications (around fifteen so far), based upon the demands of my 
clients.  Each plugin works like an application that is completely 
integrated into the Swift eNetwork infrastructure (the matrix).  Some 
web presence accounts include access to the eNetwizard class library 
(along with online reference materials to get you up to speed with the 
powerful language) and access to a subset of the PHP functions as well, 
allowing my clients to build their own applications right into the 
Swift eNetwork infrastructure.

Web presence accounts are as little as $25/mth.  And if you sign up for 
a web presence account before May 1, 2001, I'll give you one month free 
for every month you initially pay for.  =)





Once again, I want to thank you for your time.  If you have any 
questions about Swift eNetwork or are interested in becoming a client 
or an associate of Swift eNetwork, please feel free to email me.  Also, 
to gain instant access to your web matrix at Swift eNetwork, sign up 
online at http://matrix.swifte.net/


Sincerely,

Robert S. White
President, Si
http://si.swifte.net/
http://rswfire.swifte.net/


To learn more about Swift eNetwork, visit the matrix:
http://matrix.swifte.net/
















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




[PHP] how do i...?

2001-04-06 Thread rswfire

$var = "thisclass";

$myclass = new $var;

how can i make it recognize $var as a class name?

thankz in advance...

=
=
     [ rswfire ]

  http://rswfire.swifte.net/
  http://profiles.yahoo.com/rswfire

=

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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




[PHP] To The Hacker: CodeBoy

2001-02-08 Thread rswfire

Today I noticed an entry in my database with the
username "codeboy" and the password "hacked" in
one of the authorization tables I have created. 
I am shocked that someone could be so malicious
and insensitive!  I am programming locally; I
realize there may be some security
vulnerabilities during this time, but when I go
live with my network this will not be the case. 
If any further attempts are made to hack into my
system I will clearly take the time to retaliate
against you.  Let this be your only warning.

=
=
     [ rswfire ]

  http://rswfire.swifte.net/
  http://profiles.yahoo.com/rswfire

=

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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




RE: [PHP] To The Hacker: CodeBoy

2001-02-08 Thread rswfire

Whatever, James.

The hackers name is Jonathan Sharp.  He is a
regular member of this mailing list.  I do
believe that people here would like to know they
have a hacker on their hands, don't you think? 
It would appear the friendly Jonathan has another
side to himself...

Codeboy:
Jonathan Sharp
Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
[EMAIL PROTECTED]



--- James Moore [EMAIL PROTECTED] wrote:
 
 
  Today I noticed an entry in my database with
 the
  username "codeboy" and the password "hacked"
 in
  one of the authorization tables I have
 created.
  I am shocked that someone could be so
 malicious
  and insensitive!  I am programming locally; I
  realize there may be some security
  vulnerabilities during this time, but when I
 go
  live with my network this will not be the
 case.
  If any further attempts are made to hack into
 my
  system I will clearly take the time to
 retaliate
  against you.  Let this be your only warning.
 
 
 This is not the place to take these issues up.
 Please email privatly and
 complain to the appropriate authrities, the
 PHP-General list is not the
 place for this.
 
 James
 --
 James Moore
 PHP QA Team
 [EMAIL PROTECTED]
 


=
=
     [ rswfire ]

  http://rswfire.swifte.net/
  http://profiles.yahoo.com/rswfire

=

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

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




[PHP] Formatting/Financial

2001-02-01 Thread [ rswfire ]

Is there a simple way to format a variable into an appropriate financial 
string...

5.0
5.4
4.346

I'd like all of the above to format as $XXX.XX


_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




Re: [PHP] Dynamic Variable Creation from Forms

2001-01-31 Thread [ rswfire ]

Thanks for your response, but that's not my problem.  I'll explain 
further...

I have a table with the following fields in a row:

aaa
bbb
ccc
ddd
eee

I have a page with a form:

FORM POST
mysql_db_query($db, "SELECT * FROM table");
while ($row = mysql_fetch_array($result))
{

   echo "INPUT TYPE='CHECKBOX' NAME='chk_".$row["checkboxtype"]."'";

}

This will create several checkboxes with the following names:

chk_aaa
chk_bbb
chk_ccc
chk_ddd
chk_eee

ON THE NEXT PAGE, AFTER THE SUBMIT BUTTON IS CLICKED, THESE VARIABLES WILL 
EXIST, but I cannot refer to them like this:

$chk_$row["field"]

How can I refer to them???  They can change based on the field data, so they 
cannot be considered static variables.






Not *sure* i understand the problem, but this may be the solution:

$foo = "hello";
$bar = "foo";
$foobar = $$bar;

$foobar now contains "hello".

Gfunk -  http://www.gfunk007.com/

I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.


- Original Message -
From: "[ rswfire ]" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 01, 2001 11:28 AM
Subject: [PHP] Dynamic Variable Creation from Forms


I have a problem I'm not sure how to fix.

PART I

I have a form on a page that creates its variables dynamically.  Here's an
example:

mysql_db_query($db, "SELECT * FROM table");
while ($row = mysql_fetch_array($result))
{

   echo "INPUT TYPE='CHECKBOX' NAME='chk_".$row["checkboxtype"]."'";

}

PART II

I need to make reference to these dynamically created variables.  How do I
do this?  This does not work, obviously:

$chk_.$row["checkboxtype"]

Thanks in advance...
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




RE: [PHP] Pricing for PHP programming???

2001-01-31 Thread [ rswfire ]

I charge $50/hr. for any programming I do - if it's a small project.  For 
larger projects, I work out a budget with my client.

I'm in the process of releasing a new service to the web, though.  Swift 
eNetwork.  This project will allow my clients to register their website on 
the network and build their website without needing to do any programming 
(or without needing ME to do any programming, everything is dynamic) -- they 
choose their layouts, colors, etc. and put in their data and they're all 
set.  If they want to add to their website's functionality, they add some 
pre-designed, customizable plugins - and suddenly they have a fully-dynamic, 
professional website in minutes.

I read your post Josh...  I think you are a very talented programmer - and 
graphic artist.  I am lacking in the area of graphics and once I have 
established my network online I will be looking for someone to develop some 
more graphical appearing templates for my clients to use.  The concept is 
relatively simple -- all of the elements used on the page are in tables so 
as long as the graphical templates can work with tables, they should 
function perfectly.

Since the network isn't online, I can't show it to anyone.  But I added a 
page to a site where you can see some screenshots if you are interested to 
see my work.  Let me know what you think!!  And if anyone is interested in 
helping me with some of the templates, please let me know...maybe we can 
work something out together...

The release date is Valentine's Day...

http://www.geocities.com/rswfire/enetwork/

Rob
Swift International
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] Dynamic Variable Creation from Forms

2001-01-31 Thread [ rswfire ]

I have a problem I'm not sure how to fix.

PART I

I have a form on a page that creates its variables dynamically.  Here's an 
example:

mysql_db_query($db, "SELECT * FROM table");
while ($row = mysql_fetch_array($result))
{

  echo "INPUT TYPE='CHECKBOX' NAME='chk_".$row["checkboxtype"]."'";

}

PART II

I need to make reference to these dynamically created variables.  How do I 
do this?  This does not work, obviously:

$chk_.$row["checkboxtype"]

Thanks in advance...
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] Thankz

2001-01-31 Thread [ rswfire ]

The $$ thing works.  You're right, I wasn't thinking it through...
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] Apache/PHP Configuration Problem on NT5

2001-01-29 Thread [ rswfire ]

My apologies if you receive this message twice, I'm not sure if it went 
through the first time.

I've set up an ErrorDocument 404 in httpd.conf to point to a local PHP file.

When I attempt to access a page that doesn't exist, rather than seeing this 
page, I get an Internal Error 500.

If I go into the error.log, I find the following:

[Sun Jan 28 15:18:35 2001] [error] [client 127.0.0.1] Premature end of 
script headers: c:/program files/php/php.exe

This was working for a while, then it suddenly stopped working -- resulting 
in the problem mentioned above.  Any ideas on what's happening and how to 
fix the problem?
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] Hey Rasmus!

2001-01-29 Thread [ rswfire ]

There's something wrong with the PHP list...

I was wondering if you could help me with a problem I'm having...

I set up an ErrorDocument 404 in my httpd.conf file to point to a local 
file.  For awhile, this was working fine, but now I'm receiving a 500 
Internal Error message and the following is in the error.log file:[Sun

Jan 28 15:53:28 2001] [error] [client 127.0.0.1] Premature end of script 
headers: c:/program files/php/php.exe

Do you know what is causing this to happen?  Also, I only get the 
error-handling page if it's a file in the root and includes an extension of 
.php, .phtml, or .html.  It won't work if it's just a directory (that 
doesn't exist) or a file in a sub-directory, even if it has the extension.  
What's happening??

Any help you could offer would be greatly appreciated!!

Robert
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] Apache/PHP Configuration Problem on NT5

2001-01-29 Thread [ rswfire ]

I have set up an ErrorDocument 404 in httpd.conf to point to a PHP file in 
the root of my documents.  It was working, now suddenly it has stopped 
working.  Here's the scenario:

When I attempt to view a page that is not there, I receive a 500 Internal 
Error Message, as follows:



Internal Server Error
The server encountered an internal error or misconfiguration and was unable 
to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and inform them 
of the time the error occurred, and anything you might have done that may 
have caused the error.

More information about this error may be available in the server error log.

Apache/1.3.14 Server at swifte.dev Port 8080



If I look at the error log, I find the following line:

[Sun Jan 28 15:18:35 2001] [error] [client 127.0.0.1] Premature end of 
script headers: c:/program files/php/php.exe



Any ideas on how to fix this problem?
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] Custom Error 404

2001-01-27 Thread [ rswfire ]

I am designing a network of Internet sites on NT5 using PHP.  However, when 
I go live with the network, it will be on a Linux system using PHP.

My sites are handled somewhat uniquely.  When a visitor (or a component of 
the network) enters a URL address, the address does not really exist!  They 
are given a custom 404 error page that determines what information/site they 
are trying to view and the page is then created.

I need to know if Linux handles custom error messages the same as NT5.

Here's the scenario:

Let's say I call the following page:  
http://domain.com/site/index.html?anyvar=yeah

The page does not exist so the custom error page is called.  For now, I have 
phpinfo() in the custom error page.  On NT5, the following appears under the 
phpinfo():

SCRIPT_NAME  = name of error page
QUERY_STRING = 404;http://domain.com/site/index.html?anyvar=yeah

Is this how the query string will appear on a Linux machine?  I need to know 
in order to parse the string right...

If it will appear differently, please let me know how.  Thanks in advance!!
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] PHP Triad

2001-01-27 Thread [ rswfire ]

What is PHP Triad?  How can I learn more about it??

=
Hello guys,

I've just installed PHP and Apache on my Win2K workstation at home using
PHPTriad.

my include_path in PHP.ini has the following:

include_path= "p:\includes c:\phplib P:\other_staff" ;

Now, it does work well includ()ing any files from these directories, however
it won't let me include() a simple file unless I specify the $DOCUMENT_ROOT
for it:

Ho be more clear:

#we are in the same directory...
include('prepend.php'); #works because it is within 'c:\phplib' directory'
include("$DOCUMENT_ROOT/a/folder/a/file.php"); #works as long as file is
there...
include('a/folder/a/file.php'); #won't work at all ...

Yes, I know that the file is there - I use include() the same way since my
very beginning of programming.
What do you think I've misconfigured? Is that something with PHP on windows?
php.ini? directory specifications? apache?

Any suggestions would be very appreciated,

Thanks in advance,
Maxim Maletsky


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




Re: [PHP] Custom Error 404

2001-01-27 Thread [ rswfire ]

Thank you, Rasmus.

I had a feeling I needed to provide more information.  Right now, I am 
running NT 5, with the CGI version of PHP 4, and IIS 5 as the web server.

As for the Linux machine, it will be running Apache web server.  So I'm 
assuming that the information below is what I need.  It looks like all I 
need is the REDIRECT_QUERY_STRING on Apache.  So I will only need to parse 
the NT string while I am developing the network.  Thanks again!


From: Rasmus Lerdorf [EMAIL PROTECTED]
To: "[ rswfire ]" [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Custom Error 404
Date: Sat, 27 Jan 2001 12:17:01 -0800 (PST)

This is a web server question, not a PHP question.  You didn't say which
web server you are using on NT5, nor which one you are planning to use on
Linux.  PHP has nothing to do with how this works.

On Linux with Apache you will get the following variables when you make a
request for domain.com/blah?abc=123def=456

REDIRECT_ERROR_NOTES File does not exist: /home/rasmus/phpweb/blah
REDIRECT_QUERY_STRINGabc=123def=345
REDIRECT_REQUEST_METHOD  GET
REDIRECT_STATUS  404
REDIRECT_URL /blah
QUERY_STRING empty
REQUEST_URI  /blah?abc=123def=345

-Rasmus


On Sat, 27 Jan 2001, [ rswfire ] wrote:

  I am designing a network of Internet sites on NT5 using PHP.  However, 
when
  I go live with the network, it will be on a Linux system using PHP.
 
  My sites are handled somewhat uniquely.  When a visitor (or a component 
of
  the network) enters a URL address, the address does not really exist!  
They
  are given a custom 404 error page that determines what information/site 
they
  are trying to view and the page is then created.
 
  I need to know if Linux handles custom error messages the same as NT5.
 
  Here's the scenario:
 
  Let's say I call the following page:
  http://domain.com/site/index.html?anyvar=yeah
 
  The page does not exist so the custom error page is called.  For now, I 
have
  phpinfo() in the custom error page.  On NT5, the following appears under 
the
  phpinfo():
 
  SCRIPT_NAME  = name of error page
  QUERY_STRING = 404;http://domain.com/site/index.html?anyvar=yeah
 
  Is this how the query string will appear on a Linux machine?  I need to 
know
  in order to parse the string right...
 
  If it will appear differently, please let me know how.  Thanks in 
advance!!
  _
  Get your FREE download of MSN Explorer at http://explorer.msn.com
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] NT5 Sub Domains

2001-01-27 Thread [ rswfire ]

This is a little off topic, so I apologize, but I was hoping one of the 
computer gurus here could help me.

When I go live with my network, I will be using sub-domains.  Such as:  
http://subdomain.domain.com/

In order to test this on my NT5/IIS5 system, I need to be able to use these 
subdomains.  I am programming locally, so there is no .com after my name.  
It is my computer name:  http://si-exec-cio/

Does anyone know how I can configure IIS5 to include 
http://subdomain.si-exec-cio/ ?

I am using Win 2000 Professional.

Again, I apologize for sending an off-topic message.  My network is 
primarily controlled by PHP so I hope you can understand.  =)
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




Re: [PHP] NT5 Sub Domains

2001-01-27 Thread [ rswfire ]

I've never tried that before.  I'd be scared of doing something wrong.  Can 
I use Apache locally as an Intranet?  Can I run both IIS and Apache?  I 
wouldn't know where to begin...  =)

I can hear the answer already...  apache.com



From: Rasmus Lerdorf [EMAIL PROTECTED]
To: "[ rswfire ]" [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] NT5 Sub Domains
Date: Sat, 27 Jan 2001 13:31:34 -0800 (PST)

Why don't you just install the Windows version of Apache?  That way your
development environment will be much closer to your production
environment.

-Rasmus

On Sat, 27 Jan 2001, [ rswfire ] wrote:

  This is a little off topic, so I apologize, but I was hoping one of the
  computer gurus here could help me.
 
  When I go live with my network, I will be using sub-domains.  Such as:
  http://subdomain.domain.com/
 
  In order to test this on my NT5/IIS5 system, I need to be able to use 
these
  subdomains.  I am programming locally, so there is no .com after my 
name.
  It is my computer name:  http://si-exec-cio/
 
  Does anyone know how I can configure IIS5 to include
  http://subdomain.si-exec-cio/ ?
 
  I am using Win 2000 Professional.
 
  Again, I apologize for sending an off-topic message.  My network is
  primarily controlled by PHP so I hope you can understand.  =)
  _
  Get your FREE download of MSN Explorer at http://explorer.msn.com
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] Apache on NT5

2001-01-27 Thread [ rswfire ]

Rasmus,

I think that was a really good idea to install Apache on my system.  Thanks 
for the heads up.  I am downloading apache_1_3_14_win32_r2.exe.  Is that all 
I need?

This is scary new territory for me...  I hope this is the right file.
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




RE: [PHP] NT5 Sub Domains

2001-01-27 Thread [ rswfire ]


Jonathon,

Thanks so much for your help!!  Okay, I have downloaded and installed 
Apache.  And to my utter surprise...it's working!!  You're right, the fact 
that it does not have a GUI is the reason I was scared of it.  =)

I set the Apache Port option to 8080.  Is that good?  I stopped the IIS 
service.  And now I can't get it to restart, not sure why...

I set Bind to *

Should I set the ServerName directive to domain.dev?  Or does this have to 
be done in the HOSTS file you mentioned?


This is really sweet.  =)




From: "Jonathan Sharp" [EMAIL PROTECTED]
To: "[ rswfire ]" [EMAIL PROTECTED], [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: RE: [PHP] NT5 Sub Domains
Date: Sat, 27 Jan 2001 14:14:59 -0800

Ah...yes you can. You're probably scared of apache because it doesn't have 
a
GUI! But don't fret I was in the same boat not too long ago!

1) Download the lastest version of apache (www.apache.org you were 
close...)
2) Install apache (it does have an installation program)
3) Configuring apache
To configure apache you need to edit the httpd.conf file (I suggest you
create a backfirst!) it's pretty self explanatory, there's lots of
documentation for it. You can run both IIS and Apache as long as they're 
not
running on the same ports (eg :80, so either disable the web server for IIS
on port 80 (or change it to something like 64892) or make apache run on 
some
other port (you set this in httpd.conf under the Port option)) So after
you've setup your httpd.conf file, you'll start apache from the command 
line
(you may scream now if you'd like...this is where MS is...MS...) you run 
the
apache deamon with a command like C:\path\to\apache.exe start
C:\path\to\httpd.conf It's something similar to that, the command prompt
window will stay open and you won't be able to do anything in that window,
so to shut down apache, open a new window and do the C:\path\to\apache.exe
stop (I haven't done this on NT in a while so those commands are probably
wrong but it should be the right direction)

4) To setup subdomains (this is the good part)
If you want to actually setup domain.com to develop on locally and the site
isn't "online" you can add an entry to your hosts file (somewhere in
C:\WINNT\) and entry like "127.0.0.1 domain.com" (or you could create a
bogus TLD like domain.dev) and that will redirect all requests for
domain.xxx to your local apache server (assuming you've set Bind to * in 
the
httpd.conf file to listen to all IPs) For the actual subdomains you'd set
these in the httpd.conf file under VirtualDirectories (you can either do
Name based subdomains (one IP bound to NIC  multiple domains) or IP based
subdomains (multiple IPs bound to NIC  multiple domain names) Check the
apache.org documentation on how to set them up. It's not too terribly
complex...

NameVirtualHost 127.0.0.1
VirtualHost 127.0.0.1
 ServerAdmin [EMAIL PROTECTED]
 ServerName subdomain.domain.com
 DocumentRoot C:\path\to\your\website
/VirtualHost

Just be careful though...once you start using apache and such you'll be on
linux in no time...I have three dev servers now  two live servers...NT is
my desktop only because I use homesite to dev with and a few other winx
progs. Also if anyof you out there know a good colorcoding *nix developer
app (for PHP of couse) please let me know!

If you get stuck on anything, just holler... (i'm usually on EFNet in PHP 
as
codeboy)

-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


-----Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 1:42 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] NT5 Sub Domains


I've never tried that before.  I'd be scared of doing something wrong.  Can
I use Apache locally as an Intranet?  Can I run both IIS and Apache?  I
wouldn't know where to begin...  =)

I can hear the answer already...  apache.com



 From: Rasmus Lerdorf [EMAIL PROTECTED]
 To: "[ rswfire ]" [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Re: [PHP] NT5 Sub Domains
 Date: Sat, 27 Jan 2001 13:31:34 -0800 (PST)
 
 Why don't you just install the Windows version of Apache?  That way your
 development environment will be much closer to your production
 environment.
 
 -Rasmus
 
 On Sat, 27 Jan 2001, [ rswfire ] wrote:
 
   This is a little off topic, so I apologize, but I was hoping one of 
the
   computer gurus here could help me.
  
   When I go live with my network, I will be using sub-domains.  Such as:
   http://subdomain.domain.com/
  
   In order to test this on my NT5/IIS5 system, I need to be able to use
 these
   subdomains.  I am programming locally, so there is no .com after my
 name.
   It is my computer name:  http://si-exec-cio/
  
   Does anyone know how I can configure IIS5 to include
   http://subdomain.si-exec-cio/ ?
  
 

[PHP] Apache on NT 5 =)

2001-01-27 Thread [ rswfire ]

I'm getting a Forbidden error when I try to access my site using Apache.  
Does anyone know what I did wrong?  This is the contents of my httpd.conf 
file:

ServerType standalone

ServerRoot "C:/Program Files/Apache"

PidFile logs/httpd.pid

ScoreBoardFile logs/apache_runtime_status

Timeout 300

KeepAlive On

MaxKeepAliveRequests 100

KeepAliveTimeout 15

MaxRequestsPerChild 0

ThreadsPerChild 50

BindAddress *

Port 8080

ServerAdmin [EMAIL PROTECTED]

ServerName swifte.dev
DocumentRoot "C:/Inetpub"

Directory /
Options FollowSymLinks
AllowOverride None
/Directory

Directory "C:/Inetpub"

Options Indexes FollowSymLinks MultiViews

AllowOverride None

Order allow,deny
Allow from all
/Directory

IfModule mod_userdir.c
UserDir "C:/Program Files/Apache/users/"
/IfModule

IfModule mod_dir.c
DirectoryIndex index.html
/IfModule

AccessFileName .htaccess

Files ~ "^\.ht"
Order allow,deny
Deny from all
/Files

UseCanonicalName On

IfModule mod_mime.c
TypesConfig conf/mime.types
/IfModule

DefaultType text/plain

IfModule mod_mime_magic.c
MIMEMagicFile conf/magic
/IfModule

HostnameLookups Off

ErrorLog logs/error.log

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"" 
combined
LogFormat "%h %l %u %t \"%r\" %s %b" common
LogFormat "%{Referer}i - %U" referer
LogFormat "%{User-agent}i" agent

CustomLog logs/access.log common

ServerSignature On

NameVirtualHost *

_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




RE: [PHP] NT5 Sub Domains

2001-01-27 Thread [ rswfire ]

Thank you Brian and Jonathon.  You are both very helpful!!  I think I like 
the idea of a tray icon -- rather than an annoying DOS window I cannot get 
rid of from my task bar!  =)

No offense, Jonathon...  I agree, I need to work on my command line 
skills...

Should I install Apache as a service on NT??  Then it starts automatically, 
right?
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] Amazing!!

2001-01-27 Thread [ rswfire ]

I restarted the Apache server and the Forbidden error is gone.  But it does 
not recognize PHP.  What do I need to do to make that work guys?
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] CGI/PHP4

2001-01-27 Thread [ rswfire ]


Hello,

I have PHP4 installed on my NT5 system as a CGI and it is working with IIS5 
and Apache.  But I never realized that the CGI version ends up in the URL 
when I use it with Apache.  I really have a thing against this.  =)

Is there any way to prevent that?  Or do I need to use the module version?
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] JavaScript/PHP Function - Apache/IIS5 - Client Properties

2001-01-27 Thread [ rswfire ]

I need to get a whole bunch of client properties from a visitor on my site 
before a page is displayed.  I do this using JavaScript.  I first determine 
if the visitor's browser supports JavaScript, and if it does I run a 
function that basically builds a temporary page and returns a bunch of 
client properties for me.

Here's the code:

if ($Browser_JavaScriptOK == TRUE)
{

echo "HTML";
echo "HEAD";
echo "TITLE[ Swift eNetwork ] eNetWizard : 
Determining Client 
Properties/TITLE";
echo "SCRIPT LANGUAGE=\"JavaScript\"";
echo "function GetProperties()";
echo "{";
echo 
"window.location.replace(\"http://".$GLOBALS["HTTP_HOST"].$GLOBALS["SCRIPT_NAME"]."?ENETWIZARD_GETCLIENT=TRUEcName=\"+escape(navigator.appName)+\"cCodeName=\"+escape(navigator.appCodeName)+\"cVersion=\"+escape(navigator.appVersion)+\"cPlatform=\"+escape(navigator.platform)+\"cLanguage=\"+escape(navigator.language)+\"cJavaEnabled=\"+escape(navigator.javaEnabled())+\"cAvailHeight=\"+escape(screen.availHeight)+\"cAvailWidth=\"+escape(screen.availWidth)+\"cColorDepth=\"+escape(screen.colorDepth)+\"cHeight=\"+escape(screen.height)+\"cWidth=\"+escape(screen.width)+\"cPixelDepth=\"+escape(screen.pixelDepth));";
echo "}";
echo "/SCRIPT";
echo "/HEAD";
echo "BODY BGCOLOR='#00' 
OnLoad=\"GetProperties()\"nbsp;";
echo "/BODY";
echo "/HTML";
exit;

}


This code is run and then goes back to the calling page with all of the 
variables.  I then process the variables and put them into a class and build 
the page.

This works on IIS5, but when I try to do this on Apache, it freezes up and 
after a time comes back with an error message saying PHP.EXE did something 
wrong and will be closed.

Can anyone tell me what is happening?  Do you know of any other way to 
reliably return client properties?

Thankz...
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




RE: [PHP] JavaScript/PHP Function - Apache/IIS5 - Client Properties

2001-01-27 Thread [ rswfire ]

Jonathon,

I believe I have found the cause of the problem...  But first let me explain 
what I am doing better.

Yes, I am trying to gather as many stats from the client as possible.  
Before a page is display, many classes are initialized.  This particular 
class is the session class.  After it retrieves all of the client 
properties, a session is created.  If they don't have JavaScript, there's 
not much I can do, so I just use "basic settings" and give them a session.

This is done transparently.  It creates this temporary file and then reloads 
the page with the long URI.  This time the session class retrieves all of 
the properties and does put them into a database.  Then, sets the session 
id.  Then, it reloads the page again, getting rid of the long URI and just 
leaving the session id in the URI.

Well, here's where the problem appears to be.  I believe the CGI version of 
PHP on Apache is trying to parse the page as a PHP file.  Even though it is 
a simple HTML file.  Below is the HTML that is produced from the previous 
code:

HTMLHEADTITLE[ Swift eNetwork ] eNetWizard : Determining Client 
Properties/TITLESCRIPT LANGUAGE="JavaScript"function 
GetProperties(){window.location.replace("http://swifte.dev:8080/php/php.exe?ENETWIZARD_GETCLIENT=TRUEcName="+escape(navigator.appName)+"cCodeName="+escape(navigator.appCodeName)+"cVersion="+escape(navigator.appVersion)+"cPlatform="+escape(navigator.platform)+"cLanguage="+escape(navigator.language)+"cJavaEnabled="+escape(navigator.javaEnabled())+"cAvailHeight="+escape(screen.availHeight)+"cAvailWidth="+escape(screen.availWidth)+"cColorDepth="+escape(screen.colorDepth)+"cHeight="+escape(screen.height)+"cWidth="+escape(screen.width)+"cPixelDepth="+escape(screen.pixelDepth));}/SCRIPT/HEADBODY
 
BGCOLOR='#00' OnLoad="GetProperties()"nbsp;/BODY/HTML

Notice the swifte.dev:8080 -- After that is /php/php.exe -- I hate this.  
That should not be there and the filename is not there either.  So of course 
it's having a problem.  I did a check on phpinfo() and the variable 
$SCRIPT_NAME is set to /php/php.exe.  The only other variables that have the 
filename are REQUEST_URI and PATH_INFO.  But I'm still getting the same 
problem.

I don't exactly understand your code below.  First of all, I do not want to 
use cookies at all - not anywhere on my network.  Too much controversy.  So 
I take advantage of the database in that respect.  Secondly, does the code 
example below automatically submit itself??  I've never seen that done 
before...

Robert




From: "Jonathan Sharp" [EMAIL PROTECTED]
To: "[ rswfire ]" [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: [PHP] JavaScript/PHP Function - Apache/IIS5  -  Client 
Properties
Date: Sat, 27 Jan 2001 17:47:05 -0800

Hm...I'm not sure I completely understand...but I believe that you're 
trying
to gather as many stats from the client as possible?

What about having a page that is somewhat transparent to the user (if they
support JS) that you have something like this...

script
function GetProperties()
{
   document.theform.cVersion.value = navigator.appVersion;
   etc...
   document.theform.submit();
}
/script

body onLoad="GetProperties()"
form action="mainpage.php" method="POST" name="theform"
   input type="hidden" name="cVersion"
/form
img src="/img/a/nice/techno/dancing/woman.gif"br
bWelcome to my beautiful site! One moment please.../b
/body

Then you'd have mainpage.php checkthrough all those values, and possibly
dump them into a DB and create a SESSIONID which each page thereafter uses
the sessionid to lookup the client settings from the db and build the page
based upon that? Depending on how long it takes to set all the hidden 
fields
and submit the form, it might even be transparent to the user...or...you
might just have a generic front page if no session id is set and popup
window that has all that java script and say something line "Customizing 
for
YOU!" and then have that page POST to itself and then have the window close
it self (and you've set a cookie with the session id of course) so then 
each
page that he visits thereafter has the session id set. And you can 
customize
for him/her...

Cheers,
-Jonathan Sharp

Director of Technology - Imprev Inc.
Renwick Development Group - Flyerware
http://www.flyerware.com/
Phone: (425)688-9200
Cell: (425)766-1398
EPage: [EMAIL PROTECTED]


-Original Message-
From: [ rswfire ] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, January 27, 2001 5:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] JavaScript/PHP Function - Apache/IIS5 - Client
Properties


I need to get a whole bunch of client properties from a visitor on my site
before a page is displayed.  I do this using JavaScript.  I first determine

[PHP] Thankz...

2001-01-27 Thread [ rswfire ]

It took some work, but everything is working exactly as it should be across 
the entire network ... both with IIS and Apache.  Thank you, everyone, for 
your help tonight!  It was very much appreciated...
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] Uninstallation of CGI Version of PHP

2001-01-26 Thread [ rswfire ]

Hello...

I just upgraded my computer to NT5.  When doing so, I accidentally installed 
the wrong version of PHP.  =(

I installed the CGI version...  I want to use the ISAPI module.  How can I 
effectively undo what the installation program did to install the CGI 
version?  What should I do to install the ISAPI module now?

Thanks in advance for your help.

Sincerely,
rswfire
_
Get your FREE download of MSN Explorer at http://explorer.msn.com


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




[PHP] Uninstallation of CGI Version of PHP -- ISAPI Module Wanted Instead

2001-01-26 Thread rswfire

Hello...

I just upgraded my computer to NT5.  When doing
so, I accidentally installed 
the wrong version of PHP.  =(

I installed the CGI version...  I want to use the
ISAPI module.  How can I 
effectively undo what the installation program
did to install the CGI 
version?  What should I do to install the ISAPI
module now?

Thanks in advance for your help.

Sincerely,
rswfire


__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/

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




[PHP] eval() to string???

2001-01-24 Thread [ rswfire ]

I want to evaluate some PHP code to a string.  How can I do this?

$php_code = "echo 'hello';"

I would like to evaluate the code to "hello" in another string...



[PHP] Re: PHP Parse MySQ: Field???

2001-01-20 Thread [ rswfire ]

Richard,

THANK YOU!!!

I agree -- this method provides many security vulnerabilities and I appreciate the 
warning.  The database is definitely secure -- from web-surfers and others.  Also, I 
intend to parse the information going into the database myself -- using a simple parse 
engine I will create -- before making it accessible to PHP later.  :)

I have designed a class-oriented language based on PHP, and these are the functions I 
want available to my clients.  I will filter out all other commands that could be 
considered malicious.  They will only have access to the functions and variables used 
in the class language I wrote when I am done.  

What do you think?

Thankz again!

Rob


List: php-general
Subject:  Re: [PHP] PHP Parse MySQL Field???
From: "Richard Lynch" [EMAIL PROTECTED]
Date: 2001-01-20 9:27:12
[Download message RAW]

I have a BLOB field in a MySQL database that I want
to parse into my page using PHP.
For instance, in this field might be the following:

?  echo "test";  ?

So when I access this field in PHP I want it to display "test".

Is this possible?

Yeah.  That's called "eval" (short for 'evaluate')

Basically you can make PHP execute arbitrary chunks of more PHP code.

NOTE:  Letting web-surfers insert PHP code into your database to be
evaluated later is really high on the Bad Idea list...  Actually, doing this
on a web-site where you're not pretty sure the database itself is pretty
secure from not only surfers but also other potentially malicious co-users
on the same box...  It's just too easy for them to be able to put mean code
in your database...

http://php.net/eval

I *think* it goes like this:

?php
$php = 'echo "Hi";';
eval($php);
?

Never used it myself...




[PHP] Fw: PHP Parse MySQL Field???

2001-01-19 Thread [ rswfire ]

Please email me directly with your response.  I am not subscribed to the list.  Thankz 
in advance.


- Original Message - 
From: [ rswfire ] 
To: 
Sent: Friday, January 19, 2001 9:56 PM
Subject: PHP Parse MySQL Field???


I have a BLOB field in a MySQL database that I want to parse into my page using PHP.  
For instance, in this field might be the following:

?  echo "test";  ?

So when I access this field in PHP I want it to display "test".

Is this possible?



[PHP] MySQL Disk Space Usage

2001-01-17 Thread [ rswfire ]

Is it possible to find out how much disk space a particular number of rows in a table 
takes up??  If you have an answer, please email me directly.  Thank you!!



Re: [PHP] MySQL Disk Space Usage

2001-01-17 Thread [ rswfire ]

Thank you for the reply, however, I do not believe this will solve my
problem.  So please let me explain what I am trying to do.

I'll use an example.  Let's say I have a guestbook application.  And let's
say that several different people have their own guestbooks.  I would create
a guestbook table with, let's say:

rowid
person_id
(...other fields...)

What I want to do is something like a SELECT query, where I select all of
the rows by person_id.  Then, I want to find out how much DISK SPACE is
being used by these particular rows.

I am doing this to determine how much disk space is being used by any
particular client.  Each client is allocated a certain amount of disk space
usage on my server and I need to determine how much space they are using in
the database.

Any ideas on how to do this in PHP???

Please email me directly with a response.  Thank you


- Original Message -
From: Romulo Roberto Pereira [EMAIL PROTECTED]
To: [ rswfire ] [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, January 17, 2001 2:29 PM
Subject: Re: [PHP] MySQL Disk Space Usage


 I think that these are your answer:

 Memory use explanation in MYSQL DB:
 http://www.mysql.com/doc/m/y/myisamchk_memory.html

 Memory used by MYSQL DB:
 http://www.mysql.com/doc/M/e/Memory_use.html

 MYSQL DB Status:
 http://www.mysql.com/doc/S/H/SHOW_STATUS.html

 Problems with HARD DISKS and MYSQL DB:
 http://www.mysql.com/doc/D/i/Disk_issues.html

 Have fun,

 Rom
 - Original Message -
 From: [ rswfire ] [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 17, 2001 2:09 PM
 Subject: [PHP] MySQL Disk Space Usage


 Is it possible to find out how much disk space a particular number of rows
 in a table takes up??  If you have an answer, please email me directly.
 Thank you!!




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