RE: [PHP] Extensions Directory (PEAR/PECL)

2006-05-19 Thread Robert Samuel White
[SNIP]

 When I ran the command:
 pecl install zip-1.3.1
 It intalled the zip.so file to:
 /usr/local/lib/php/extensions/no-debug-non-zts-20050922/zip.so
   

Extensions are compiled with a given Zend/PHP API.  The zip extension 
you installed was compiled against the API dated 2005-09-22.  I 
complained/questioned this default behavior of 'pecl install' myself and 
asked why pecl didn't use the 'extension dir' value I already had set in 
the PHP.ini file.  The response was that the php.ini file is not the 
authoritative definition for the extension directory because there could 
in theory be many php.ini files all over the system not to mention the 
defaults which might be used if no php.ini file exists at all.

 The only way I could get zip support working was to put it here:
/usr/local/php/ext
 Which is where my extensions directory is located. I've checked, and the
 extensions directory is set correctly in the php.ini file. Does anyone
know
 where/how it would come up with this other path?
   

I've seen several people complain about this problem, but it doesn't 
seem anyone wants to change it.  If you want your life to continue 
without tons of stress, just go with the flow, don't try to customize 
your installation, and just accept the defaults.  Yeah, I didn't like 
that answer either.

In summary:  Change your php.ini file to match the 
'no-debug-non-zts-20050922' default directory and your problems will go 
away.

Dante

[/SNIP]


Thanks.  At least I know it's not something that can be changed.  I'll just
move them to the appropriate place after it installs them.  That seems to be
working just fine.  I just wanted to make sure I wasn't missing some
configuration directive that could point these to where I really want
them...  I did notice the 20050922 in my phpinfo() page under PHP Extension.

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



[PHP] Re: [Repost] Getting rid of Web page has expired (POSTDATA Error)

2006-05-18 Thread Robert Samuel White
You might want to modify your coding.  The way I prevent this problem from
ever happening is this:

 

1.  The user completes information on the form.

2.  The form is validated by PHP.

3.  If there are errors, then the form is reshown with their values
populated.

4.  Once all errors are corrected, I process the form and then use a
Header(Location: ) to redirect the user to the same page (or another
page).

 

This has the advantage of allowing a user to click the back button and
seeing their form with their values still intact.

 

This prevents a method post page from being in the user's browser history.



[PHP] Re: PHP and mySQL getting smashed...

2006-05-18 Thread Robert Samuel White
Upgrade your MySQL distribution to the latest version (5+).

 

Upgrade any shared MySQL libraries to the latest distribute.

 

Recompile MySQL with mysqli support.

 

http://php.net/mysqli

 

And use that instead of the regular MySQL functions.

 

That's what I did and it has made a huge difference.

 

Not to mention, the mysqli library has so many more functions available to
you.

 

~Samuel

 

 



RE: [PHP] Re: [Repost] Getting rid of Web page has expired (POSTDATA Error)

2006-05-18 Thread Robert Samuel White
[SNIP] 

Now one thing bothers me: how do you redirect in step 4 if you have shown
the form in step 3?

How do you avoid a Cannot modify header information - headers already sent
by ... error message?

Nicolas Verhaeghe
E-mail: [EMAIL PROTECTED]
Phone: 602-490-8000

[/SNIP]



Nicholas,

As long as you haven't outputted anything from your script after the form
post, you can redirect just fine.

Step 3 and Step 4 are two different steps.

You need something like this:


if (isset($_POST[btnSubmit]))
{

  // validate form

}

if (!$form_passes_validation)
{

  // show form

} else
{

   Header(location: );

}

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



[PHP] Extensions Directory (PEAR/PECL)

2006-05-18 Thread Robert Samuel White
Please let me know if this would be more appropriate to post in a PEAR or
PECL forum.  Today, I've been trying to install some extensions - in
particular, the GD library and the ZIP library.  I've finally managed to get
it all working, but there was one issue that I'd like to clear up for future
reference if possible.

When I ran the command:

pecl install zip-1.3.1

It intalled the zip.so file to:

/usr/local/lib/php/extensions/no-debug-non-zts-20050922/zip.so

The only way I could get zip support working was to put it here:

/usr/local/php/ext

Which is where my extensions directory is located.

I've checked, and the extensions directory is set correctly in the php.ini
file.

Does anyone know where/how it would come up with this other path?

TIA

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



[PHP] Regex Help for URL's

2006-05-16 Thread Robert Samuel White
Can someone help me modify the following code?

It was designed to search for all instances of [LEVEL#]...[/LEVEL#]

I need a preg_match_all that will search for all of instances of an URL.

It should be sophisticated enough to find something as complicated as this:

http(s)://x.y.z.domain.com/dir/dir/file.name.ext?query=1query=2#anchor

Any help would be greatly appreciated!

preg_match_all('#\[LEVEL([0-9])\](.*)\[/LEVEL[0-9]]#Uim', $arcContent,
$tmpMatches);

$arcContent = preg_replace('#\[LEVEL([0-9])\](.*)\[/LEVEL[0-9]]#Uim',
'###URL###', $arcContent); 

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



RE: [PHP] Regex Help for URL's

2006-05-16 Thread Robert Samuel White
Don't be rude.  I've already don't all of that.  Nothing came up.  I've been
programming for 20 years (since I was 11 years old) so I'm not a slacker
when it comes to learning new things, however, I have always found regular
expressions to be extremely difficult.  Someone here might have the answer I
need, and if so, I'd appreciate a response.  If you don't know the answer,
don't reply.  Simple enough, don't you think?

-Original Message-
From: Jochem Maas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 16, 2006 4:28 PM
To: Robert Samuel White
Cc: php-general@lists.php.net
Subject: Re: [PHP] Regex Help for URL's

Robert Samuel White wrote:
 Can someone help me modify the following code?
 
 It was designed to search for all instances of [LEVEL#]...[/LEVEL#]
 
 I need a preg_match_all that will search for all of instances of an URL.
 
 It should be sophisticated enough to find something as complicated as
this:
 
 http(s)://x.y.z.domain.com/dir/dir/file.name.ext?query=1query=2#anchor
 
 Any help would be greatly appreciated!

so your looking for a regular expression that is *totally* different
from the regular expression you have... the two have nothing in common.

do you expect us to do the complete rewrite for you or do you want to
learn abit about regexps yourself? (that probably sounds arrogant, so it
might
help to know even the most experienced people (a group I don't consider
myself
part of) here have [and do] get told to RTFM on occasion - no one is safe
;-)

I suggest using a search engine to start with and see what that turns up...
somehow I can't believe that nobody has ever written a regexp that matches
urls,
for instance try reading this page in the manual (hint: look at the the user
notes)

http://php.net/preg_match

come back when/if you get stuck.

 
 preg_match_all('#\[LEVEL([0-9])\](.*)\[/LEVEL[0-9]]#Uim', $arcContent,
 $tmpMatches);
 
 $arcContent = preg_replace('#\[LEVEL([0-9])\](.*)\[/LEVEL[0-9]]#Uim',
 '###URL###', $arcContent); 
 

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



RE: [PHP] Regex Help for URL's

2006-05-16 Thread Robert Samuel White
-ROW1-TD'; window.status = ''; return true;
ONCLICK=location.href = 'mailto:[EMAIL PROTECTED]'; return true;
STYLE=cursor: pointer;DIV CLASS=RSW-DIV-ROW1-LEFTSPAN
CLASS=RSW-FONT-ROW1-TEXTA CLASS=RSW-FONT-ROW1-LINK
HREF=mailto:[EMAIL PROTECTED] ONMOUSEOVER=window.status =
'[EMAIL PROTECTED]'; return true; ONMOUSEOUT=window.status = ''; return
true;[EMAIL PROTECTED]/ABReNetwizard,
Inc./SPAN/DIV/TD/TR/TABLEDIV STYLE=font-size:
10px;nbsp;/DIVTABLE CLASS=RSW-TABLETR
CLASS=RSW-TABLE-HEAD-TRTD CLASS=RSW-TABLE-HEAD-TDDIV
CLASS=RSW-DIV-HEAD-CENTERSPAN CLASS=RSW-FONT-HEAD-TEXTFeatured
Websites/SPAN/DIV/TD/TRTR CLASS=RSW-TABLE-ROW1-TRTD
CLASS=RSW-TABLE-ROW1-TD ONMOUSEOVER=this.className = 'RSW-TABLE-SEP1-TD';
window.status = 'Auto Speed Graphics'; return true;
ONMOUSEOUT=this.className = 'RSW-TABLE-ROW1-TD'; window.status = ''; return
true; ONCLICK=location.href =
'http://www.autospeedgraphics.com/default.rsw'; return true; STYLE=cursor:
pointer;DIV CLASS=RSW-DIV-ROW1-LEFTSPAN CLASS=RSW-FONT-ROW1-TEXTA
CLASS=RSW-FONT-ROW1-LINK
HREF=http://www.autospeedgraphics.com/default.rsw;
ONMOUSEOVER=window.status = 'Auto Speed Graphics'; return true;
ONMOUSEOUT=window.status = ''; return true;Auto Speed
Graphics/ABRautospeedgraphics.com/SPAN/DIV/TD/TRTR
CLASS=RSW-TABLE-ROW2-TRTD CLASS=RSW-TABLE-ROW2-TD
ONMOUSEOVER=this.className = 'RSW-TABLE-SEP2-TD'; window.status = 'Camp;C
Technologies, Inc.'; return true; ONMOUSEOUT=this.className =
'RSW-TABLE-ROW2-TD'; window.status = ''; return true;
ONCLICK=location.href = 'http://www.ccreportingsiteonline.com/default.rsw';
return true; STYLE=cursor: pointer;DIV CLASS=RSW-DIV-ROW2-LEFTSPAN
CLASS=RSW-FONT-ROW2-TEXTA CLASS=RSW-FONT-ROW2-LINK
HREF=http://www.ccreportingsiteonline.com/default.rsw;
ONMOUSEOVER=window.status = 'Camp;C Technologies, Inc.'; return true;
ONMOUSEOUT=window.status = ''; return true;Camp;C Technologies,
Inc./ABRccreportingsiteonline.com/SPAN/DIV/TD/TRTR
CLASS=RSW-TABLE-ROW1-TRTD CLASS=RSW-TABLE-ROW1-TD
ONMOUSEOVER=this.className = 'RSW-TABLE-SEP1-TD'; window.status = 'High
Speed Data Extranet'; return true; ONMOUSEOUT=this.className =
'RSW-TABLE-ROW1-TD'; window.status = ''; return true;
ONCLICK=location.href = 'http://www.hsdextranet.com/default.rsw'; return
true; STYLE=cursor: pointer;DIV CLASS=RSW-DIV-ROW1-LEFTSPAN
CLASS=RSW-FONT-ROW1-TEXTA CLASS=RSW-FONT-ROW1-LINK
HREF=http://www.hsdextranet.com/default.rsw; ONMOUSEOVER=window.status =
'High Speed Data Extranet'; return true; ONMOUSEOUT=window.status = '';
return true;High Speed Data
Extranet/ABRhsdextranet.com/SPAN/DIV/TD/TRTR
CLASS=RSW-TABLE-ROW2-TRTD CLASS=RSW-TABLE-ROW2-TD
ONMOUSEOVER=this.className = 'RSW-TABLE-SEP2-TD'; window.status = 'Robert
Samuel White'; return true; ONMOUSEOUT=this.className =
'RSW-TABLE-ROW2-TD'; window.status = ''; return true;
ONCLICK=location.href = 'http://www.rswfire.com/default.rsw'; return true;
STYLE=cursor: pointer;DIV CLASS=RSW-DIV-ROW2-LEFTSPAN
CLASS=RSW-FONT-ROW2-TEXTA CLASS=RSW-FONT-ROW2-LINK
HREF=http://www.rswfire.com/default.rsw; ONMOUSEOVER=window.status =
'Robert Samuel White'; return true; ONMOUSEOUT=window.status = ''; return
true;Robert Samuel White/ABRrswfire.com/SPAN/DIV/TD/TRTR
CLASS=RSW-TABLE-ROW1-TRTD CLASS=RSW-TABLE-ROW1-TD
ONMOUSEOVER=this.className = 'RSW-TABLE-SEP1-TD'; window.status = 'Sports
Display Frames'; return true; ONMOUSEOUT=this.className =
'RSW-TABLE-ROW1-TD'; window.status = ''; return true;
ONCLICK=location.href = 'http://www.sportsdisplayframes.com/default.rsw';
return true; STYLE=cursor: pointer;DIV CLASS=RSW-DIV-ROW1-LEFTSPAN
CLASS=RSW-FONT-ROW1-TEXTA CLASS=RSW-FONT-ROW1-LINK
HREF=http://www.sportsdisplayframes.com/default.rsw;
ONMOUSEOVER=window.status = 'Sports Display Frames'; return true;
ONMOUSEOUT=window.status = ''; return true;Sports Display
Frames/ABRsportsdisplayframes.com/SPAN/DIV/TD/TRTR
CLASS=RSW-TABLE-ROW2-TRTD CLASS=RSW-TABLE-ROW2-TD
ONMOUSEOVER=this.className = 'RSW-TABLE-SEP2-TD'; window.status = 'Tristar
Select'; return true; ONMOUSEOUT=this.className = 'RSW-TABLE-ROW2-TD';
window.status = ''; return true; ONCLICK=location.href =
'http://www.tristarselect.com/default.rsw'; return true; STYLE=cursor:
pointer;DIV CLASS=RSW-DIV-ROW2-LEFTSPAN CLASS=RSW-FONT-ROW2-TEXTA
CLASS=RSW-FONT-ROW2-LINK HREF=http://www.tristarselect.com/default.rsw;
ONMOUSEOVER=window.status = 'Tristar Select'; return true;
ONMOUSEOUT=window.status = ''; return true;Tristar
Select/ABRtristarselect.com/SPAN/DIV/TD/TR/TABLEDIV
STYLE=font-size: 10px;nbsp;/DIVTABLE CLASS=RSW-TABLETR
CLASS=RSW-TABLE-HEAD-TRTD CLASS=RSW-TABLE-HEAD-TDDIV
CLASS=RSW-DIV-HEAD-CENTERSPAN CLASS=RSW-FONT-HEAD-TEXTDevelopment
Calendar/SPAN/DIV/TD/TRTR CLASS=RSW-TABLE-ROW1-TRTD
CLASS=RSW-TABLE-ROW1-TD ONMOUSEOVER=javascript:this.className =
'RSW-TABLE-SEP1-TD'; ONMOUSEOUT=javascript:this.className =
'RSW-TABLE-ROW1-TD';DIV CLASS=RSW-DIV-ROW1-LEFTSPAN
CLASS=RSW-FONT-ROW1-TEXTA CLASS=RSW-FONT-ROW1-LINK
HREF=http://www.enetwizard.ms/default.rsw;eNetwizard Matrix
Server/ABRTBA nbsp;v0.0.2/SPAN

RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
In case any one is looking for a solution to a similar problem as me, here
is the answer.  I used the code from my original post as my guiding light,
and with some experimentation, I figured it out.

To get any URL, regardless of where it is located, use this:

preg_match_all(#\'http://(.*)\'#U, $content, $matches);

This match anything similar to:

'http://www.domain.com/dir/dir/file.txt?query=blah'

This is useful, if for example, you have a tag like this one:

A HREF=javascript:void(0); ONCLICK=javascript:window.open =
'http://www.domain.com/dir/dir/file.txt?query=blah';

Now, for tags which are in quotes, rather than single quotes, just use:

preg_match_all(#\http://(.*)\#U, $content, $matches);


This is really only the first step.

In order to be useful, you need a way to process these urls according to
your own specific needs:

preg_match_all(#\'http://(.*)\'#U, $content, $matches);

$content = preg_replace(#\'http://(.*)\'#U, '###URL###', $content);

This will modify the $content variable to change all urls to ###URL###

You can then go through them one at a time to process them:

for ($count = 0; $count  count($matches[1]); $count++)

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



RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
All pages used by my content management system must be in a valid format.

Old-school style pages are never created so the solution I have come up with
is perfect for my needs.

Thank you.

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



RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White
In my opinion, it is the most reasonable solution.  I have looked all over
the web for something else, but this works perfectly for me.  It's
impossible to tell where an url starts and ends if you don't have it in
quotes or single quotes.  If someone really needs to find all the urls in a
page, then they'll code their pages to make use of this limitation.

-Original Message-
From: Chrome [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 16, 2006 8:24 PM
To: 'Robert Samuel White'; php-general@lists.php.net
Subject: RE: [PHP] Regex Help for URL's [ANSWER]


 -Original Message-
 From: Robert Samuel White [mailto:[EMAIL PROTECTED]
 Sent: 17 May 2006 01:16
 To: php-general@lists.php.net
 Subject: RE: [PHP] Regex Help for URL's [ANSWER]
 
 All pages used by my content management system must be in a valid format.
 
 Old-school style pages are never created so the solution I have come up
 with
 is perfect for my needs.
 
 Thank you.

Doesn't that make it a proprietary solution? IMHO offering the regex may
create a false situation for people... So the answer may not be for everyone

Might be wrong :)

Dan

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



RE: [PHP] Regex Help for URL's [ANSWER]

2006-05-16 Thread Robert Samuel White

 If we are talking clickable links, why not focus on the a construct
 itself? Otherwise URLs are just part of the page's textual content... Very
 difficult to parse that

 Disseminating an a tag isn't brain-meltingly difficult with a regex if
 you put your mind to it... With or without quotes, be they single, double 
 or non-existent

If I've misunderstood please chastise me :)

HTH

Dan


Dan,

That's what I was doing.  I was parsing A:HREF, IMG:SRC, etc.

But when I implemented a new feature on my network, where you could click on
a row and have it take you to another domain, I need a better solution.

Go to http://www.enetwizard.ws and it might make more sense.

All the links on the left have an ONCLICK=location.href = '' attribute in
the TR tag.

This solution allowed me to make sure those links included the session
information, just like the A:HREF links do.

It also had the advantage of updating the links in my CSS.

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



[PHP] PHP/Content Management

2003-07-07 Thread Robert Samuel White
Just a quick message to let everyone know that after ten months I have 
finally released the first official open source version of eNetwizard 
Matrix Server, my sophisticated content management system and 
application server.  All it needs is PHP, MySQL, and Apache.  Full 
instructions are included on the website.  More information about it is 
below...

http://matrix.enetwizard.net/default.rsw


About eNetwizard Matrix Server

eNetwizard Matrix Server takes content management and web application 
serving to levels undreamt, infusing your web environment with sheer 
power and possibility.


Cutting Edge Technology

 - Never before has a content management system been designed around 
the concept of a universal point of contact for all requests.  This 
server knows all, and delivers all. 

 - Never before has a content management system been designed to render 
and manage the content of an unlimited number of domains and websites 
for an unlimited number of businesses and organizations.  Expect 
nothing less from our server.


Core Features

 - Production Environment Ready.  The server before you has had no 
corners cut in its design.  It is stable and ready for production 
environments, with only a few minor limitations or idiocyncracies.  And 
it's free and open source.

 - Infinitely Expansive Design.  The server was designed to manage an 
infinite number of domains, websites, components, organizations, 
groups, and users, all from a single running copy of its distribution.

 - Complete Content Management.  The server manages the content of all 
mime types and can deliver the content to the requesting client based 
on customizable settings of the server for each mime type.

 - Seemless Integration with Other Server Software.  The server was 
designed to complement the job of the web server and server side 
scripting languages, and does not replace nor interfere with their 
purposes.  In fact, you can utilize all of them from within the system 
in a myriad of useful ways.

 - Language Independent.  The server, objects, and wizards were all 
designed to contain its strings in an XML localization file, allowing 
it to run in any language it has been translated into.  In a near 
future release, it will also be possible to render content into the 
language appropriate for the visitor.

 - Cascading Templates.  Web page design and layout are controlled by 
templates, allowing for quick and cost-effective website redesigns.  
Templates can be modified in real time, changing the layout, colors, 
and other style properties instantaneously.  Templates are cascading 
through the matrix folder, meaning templates can be defined for a 
single page or an entire domain or website.

 - Workflow Ready.  This version of the server includes everything 
needed to manage an infinite number of organizations, groups, and 
users, all with unique roles, policy permissions, and access rights 
throughout the matrix.  It lacks only a few things when it comes to 
workflow, and these added features will be included in a near future 
release.

 - Inclusive Session Management.  The server does not rely upon cookies 
at all to manage the individual sessions of each user accessing the 
server.  Instead, it automatically and uniquely propagates this 
information into each request and embeds the information into every 
link managed by the server.

 - Search Engine Aware.  The server automatically disables sessions for 
known search engines, preventing them from including session 
information in their indexes.  This is also useful if you wish to 
create a page for the search engine that does not include the template, 
thereby only showing the content of the page to the search engine for 
indexing.

 - Browser Aware.  The server automatically determines browser 
information from each visitor and assigns it to their session.  Some of 
the collected information includes the user's languages and screen 
resolution, as well as their browser capabilities.  This information is 
made available via the $Core-BrowserInfo[] array.

 - Extensive Logging.  The server logs activity to all components, from 
websites and pages to files and objects.  It logs all form post and get 
data, cookies, system functions, and script warnings and errors, 
depending upon your configuration.  It also logs all attempts at 
treacherous activity anywhere within the system!

 - Wizardly Management.  The server includes a built-in wizard 
component, which includes the eNetwizard Control Panel, for easy 
management of every aspect of the server.  As expressed by a recent 
user of the Control Panel, it's overwhelmingly powerful.

 - Customizable Website Applications.  Objects are a powerful way to 
make use of the server, allowing you to click once and build anything 
from a guestbook or newsletter to a first-class e-commerce application, 
rendered in the style properties appropriate for the website, and fully 
managed from the eNetwizard Control Panel.

 - Much More!
 

Re: [PHP] PHP/Content Management

2003-07-07 Thread Robert Samuel White
Hello,

I was just alerted of the issue by another fellow with a way excellent 
website at saturn5.com  :-)

I wish I could help you!  But I have never heard of the Safari browser 
and without using it or getting more information about what is causing 
your problem, I cannot do anything!

It is known to work with IE 4-6+ on Windows, most Netscapes, Mozilla, 
Lynx, etc.., but may have some problems with the Mac and now the Safari 
browser...

Is it possible the problem could be Safari does not recognize the Header
() command in PHP???

Thanks!

=

Do you realize that link does not work with the Safari browser?  it just
shows up blank :(

Rick

When one door closes, another opens; but we often look so long and so
regretfully upon the closed door that we do not see the one which has 
opened
for us. - Alexander Graham Bell

 From: Robert Samuel White [EMAIL PROTECTED]
 Reply-To: Robert Samuel White [EMAIL PROTECTED]
 Date: Mon, 07 Jul 2003 16:54:11 -0400
 To: [EMAIL PROTECTED]
 Subject: [PHP] PHP/Content Management
 
 Just a quick message to let everyone know that after ten months I have
 finally released the first official open source version of eNetwizard
 Matrix Server, my sophisticated content management system and
 application server.  All it needs is PHP, MySQL, and Apache.  Full
 instructions are included on the website.  More information about it 
is
 below...
 
 http://matrix.enetwizard.net/default.rsw
 
 
 About eNetwizard Matrix Server
 
 eNetwizard Matrix Server takes content management and web application
 serving to levels undreamt, infusing your web environment with sheer
 power and possibility.
 
 
 Cutting Edge Technology
 
 - Never before has a content management system been designed around
 the concept of a universal point of contact for all requests.  This
 server knows all, and delivers all.
 
 - Never before has a content management system been designed to render
 and manage the content of an unlimited number of domains and websites
 for an unlimited number of businesses and organizations.  Expect
 nothing less from our server.
 
 
 Core Features
 
 - Production Environment Ready.  The server before you has had no
 corners cut in its design.  It is stable and ready for production
 environments, with only a few minor limitations or idiocyncracies.  
And
 it's free and open source.
 
 - Infinitely Expansive Design.  The server was designed to manage an
 infinite number of domains, websites, components, organizations,
 groups, and users, all from a single running copy of its distribution.
 
 - Complete Content Management.  The server manages the content of all
 mime types and can deliver the content to the requesting client based
 on customizable settings of the server for each mime type.
 
 - Seemless Integration with Other Server Software.  The server was
 designed to complement the job of the web server and server side
 scripting languages, and does not replace nor interfere with their
 purposes.  In fact, you can utilize all of them from within the system
 in a myriad of useful ways.
 
 - Language Independent.  The server, objects, and wizards were all
 designed to contain its strings in an XML localization file, allowing
 it to run in any language it has been translated into.  In a near
 future release, it will also be possible to render content into the
 language appropriate for the visitor.
 
 - Cascading Templates.  Web page design and layout are controlled by
 templates, allowing for quick and cost-effective website redesigns.
 Templates can be modified in real time, changing the layout, colors,
 and other style properties instantaneously.  Templates are cascading
 through the matrix folder, meaning templates can be defined for a
 single page or an entire domain or website.
 
 - Workflow Ready.  This version of the server includes everything
 needed to manage an infinite number of organizations, groups, and
 users, all with unique roles, policy permissions, and access rights
 throughout the matrix.  It lacks only a few things when it comes to
 workflow, and these added features will be included in a near future
 release.
 
 - Inclusive Session Management.  The server does not rely upon cookies
 at all to manage the individual sessions of each user accessing the
 server.  Instead, it automatically and uniquely propagates this
 information into each request and embeds the information into every
 link managed by the server.
 
 - Search Engine Aware.  The server automatically disables sessions for
 known search engines, preventing them from including session
 information in their indexes.  This is also useful if you wish to
 create a page for the search engine that does not include the 
template,
 thereby only showing the content of the page to the search engine for
 indexing.
 
 - Browser Aware.  The server automatically determines browser
 information from each visitor and assigns it to their session.  Some 
of
 the collected information includes the user's languages

Re: [PHP] PHP/Content Management

2003-07-07 Thread Robert Samuel White
I fixed the problem; now works with Safari.  =)

Richard Baskett wrote:

Do you realize that link does not work with the Safari browser?  it just
shows up blank :(
Rick

When one door closes, another opens; but we often look so long and so
regretfully upon the closed door that we do not see the one which has opened
for us. - Alexander Graham Bell
 

From: Robert Samuel White [EMAIL PROTECTED]
Reply-To: Robert Samuel White [EMAIL PROTECTED]
Date: Mon, 07 Jul 2003 16:54:11 -0400
To: [EMAIL PROTECTED]
Subject: [PHP] PHP/Content Management
Just a quick message to let everyone know that after ten months I have
finally released the first official open source version of eNetwizard
Matrix Server, my sophisticated content management system and
application server.  All it needs is PHP, MySQL, and Apache.  Full
instructions are included on the website.  More information about it is
below...
http://matrix.enetwizard.net/default.rsw

About eNetwizard Matrix Server

eNetwizard Matrix Server takes content management and web application
serving to levels undreamt, infusing your web environment with sheer
power and possibility.
Cutting Edge Technology

- Never before has a content management system been designed around
the concept of a universal point of contact for all requests.  This
server knows all, and delivers all.
- Never before has a content management system been designed to render
and manage the content of an unlimited number of domains and websites
for an unlimited number of businesses and organizations.  Expect
nothing less from our server.
Core Features

- Production Environment Ready.  The server before you has had no
corners cut in its design.  It is stable and ready for production
environments, with only a few minor limitations or idiocyncracies.  And
it's free and open source.
- Infinitely Expansive Design.  The server was designed to manage an
infinite number of domains, websites, components, organizations,
groups, and users, all from a single running copy of its distribution.
- Complete Content Management.  The server manages the content of all
mime types and can deliver the content to the requesting client based
on customizable settings of the server for each mime type.
- Seemless Integration with Other Server Software.  The server was
designed to complement the job of the web server and server side
scripting languages, and does not replace nor interfere with their
purposes.  In fact, you can utilize all of them from within the system
in a myriad of useful ways.
- Language Independent.  The server, objects, and wizards were all
designed to contain its strings in an XML localization file, allowing
it to run in any language it has been translated into.  In a near
future release, it will also be possible to render content into the
language appropriate for the visitor.
- Cascading Templates.  Web page design and layout are controlled by
templates, allowing for quick and cost-effective website redesigns.
Templates can be modified in real time, changing the layout, colors,
and other style properties instantaneously.  Templates are cascading
through the matrix folder, meaning templates can be defined for a
single page or an entire domain or website.
- Workflow Ready.  This version of the server includes everything
needed to manage an infinite number of organizations, groups, and
users, all with unique roles, policy permissions, and access rights
throughout the matrix.  It lacks only a few things when it comes to
workflow, and these added features will be included in a near future
release.
- Inclusive Session Management.  The server does not rely upon cookies
at all to manage the individual sessions of each user accessing the
server.  Instead, it automatically and uniquely propagates this
information into each request and embeds the information into every
link managed by the server.
- Search Engine Aware.  The server automatically disables sessions for
known search engines, preventing them from including session
information in their indexes.  This is also useful if you wish to
create a page for the search engine that does not include the template,
thereby only showing the content of the page to the search engine for
indexing.
- Browser Aware.  The server automatically determines browser
information from each visitor and assigns it to their session.  Some of
the collected information includes the user's languages and screen
resolution, as well as their browser capabilities.  This information is
made available via the $Core-BrowserInfo[] array.
- Extensive Logging.  The server logs activity to all components, from
websites and pages to files and objects.  It logs all form post and get
data, cookies, system functions, and script warnings and errors,
depending upon your configuration.  It also logs all attempts at
treacherous activity anywhere within the system!
- Wizardly Management.  The server includes a built-in wizard
component, which includes the eNetwizard Control Panel, for easy
management of every aspect

[PHP] testing for negative numbers

2003-02-06 Thread Robert Samuel White
I realize this should be about the simplest thing in the world to do, 
but for this reason or that it's not working...

I'm using PHP version 4.2.3

Whether I have a negative number in an array, for example:

$myArray[ID] = -2

Or the number comes from the database, for example:

$row[id] = -2

I cannot get this simple operation to work:

if ($row[id]  0)

Instead, positive or negative, it seems to think this expression is 
always true:

if ($row[id]  0)

It's like it takes the absolute value of the number (whether the number 
is 2 or -2, it thinks it is 2)

I've tried many things, including type casting using (int) in front of 
the expression.

Nothing has worked.

Any ideas why in the world this is happening?  Thanks.





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



Re: [PHP] testing for negative numbers

2003-02-06 Thread Robert Samuel White
Hi Rasmus:

Yes, I'm totally aware of case sensitivity...and basically the script 
you wrote here is exactly what I'm trying to doing.  This is a problem 
I've been having with several scripts...always when the number is 
negative.  I've also echoed my variables just to make sure they are in 
fact negative numbers.  This is an odd thing I've been dealing with for 
a while now.

This only happens when the value is negative.  But anyway, here's the 
part of the script I'm encountering the problem at:

   $result = $Database-Query(SELECT * FROM 
.DBT__MATRIX_STRUCTURE_CONTENT. WHERE content_id = '.$tmpParentId.');
   while ($row = $Database-FetchArray($result))
   {

   $tmpArray[$tmpCount][ID-PARENT] = 
$row[parent_id];
   $tmpArray[$tmpCount][ID-DIR]= $row[dir_id];
   $tmpArray[$tmpCount][TYPE]  = 
$row[content_type];
   $tmpArray[$tmpCount][FILE]  = 
$row[content_file];
   $tmpArray[$tmpCount][TITLE] = 
$row[content_title];
   $tmpArray[$tmpCount][VERSION]   = 
$row[content_version];

   if ($row[dir_id]  0)
   {

   $resultc = $Database-Query(SELECT * FROM 
.DBT__MATRIX_STRUCTURE_DIR. WHERE dir_id = '.$row[dir_id].');
   while ($rowc = $Database-FetchArray($resultc))
   {

   $tmpArray[$tmpCount][PATH] = 
$rowc[dir_path];

   }
   $Database-FreeResult($resultc);

   }

   if ((int)$row[dir_id]  0)
   {

   $resultc = $Database-Query(SELECT * FROM 
.DBT__MATRIX_STRUCTURE_ROUTES. WHERE dir_id = '.$row[dir_id].');
   while ($rowc = $Database-FetchArray($resultc))
   {

   $tmpArray[$tmpCount][ALIAS] = 
$rowc[dir_alias];
   $tmpArray[$tmpCount][PATH]  = 
$rowc[dir_path];
   echo xxx; exit();

   }
   $Database-FreeResult($resultc);


   }



Rasmus Lerdorf wrote:

Please provide a complete test script.  Are you perhaps not realizing that
array indices along with all variables in PHP are case sensitive?
$row[ID] and $row[id] are not the same thing.

The trivial test of your example:

   $myArray[id] = -2;
   if ($myArray[id]  0) echo Negative;
   else echo Positive;

Prints Negative as expected.

-Rasmus

On Thu, 6 Feb 2003, Robert Samuel White wrote:

 

I realize this should be about the simplest thing in the world to do,
but for this reason or that it's not working...

I'm using PHP version 4.2.3

Whether I have a negative number in an array, for example:

$myArray[ID] = -2

Or the number comes from the database, for example:

$row[id] = -2

I cannot get this simple operation to work:

if ($row[id]  0)

Instead, positive or negative, it seems to think this expression is
always true:

if ($row[id]  0)

It's like it takes the absolute value of the number (whether the number
is 2 or -2, it thinks it is 2)

I've tried many things, including type casting using (int) in front of
the expression.

Nothing has worked.

Any ideas why in the world this is happening?  Thanks.





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

   




 






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




Re: [PHP] testing for negative numbers

2003-02-06 Thread Robert Samuel White
Well, I just tried your test script and that works just as it should, so 
I must be having some other issue.  But that still doesn't explain why I 
can print out the results of $row[dir_id] and it shows it being -2, 
yet my script (as printed in the last email) never makes it to the 
correct conditional statement.

Rasmus Lerdorf wrote:

Please provide a complete test script.  Are you perhaps not realizing that
array indices along with all variables in PHP are case sensitive?
$row[ID] and $row[id] are not the same thing.

The trivial test of your example:

   $myArray[id] = -2;
   if ($myArray[id]  0) echo Negative;
   else echo Positive;

Prints Negative as expected.

-Rasmus

On Thu, 6 Feb 2003, Robert Samuel White wrote:

 

I realize this should be about the simplest thing in the world to do,
but for this reason or that it's not working...

I'm using PHP version 4.2.3

Whether I have a negative number in an array, for example:

$myArray[ID] = -2

Or the number comes from the database, for example:

$row[id] = -2

I cannot get this simple operation to work:

if ($row[id]  0)

Instead, positive or negative, it seems to think this expression is
always true:

if ($row[id]  0)

It's like it takes the absolute value of the number (whether the number
is 2 or -2, it thinks it is 2)

I've tried many things, including type casting using (int) in front of
the expression.

Nothing has worked.

Any ideas why in the world this is happening?  Thanks.





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

   




 






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




Re: [PHP] testing for negative numbers

2003-02-06 Thread Robert Samuel White
Okay, I'm an idiot.  It *was* making it to the statement, but the row_id 
in the table matrix_structure_routes are actually positive numbers, so 
when it gets to that point I need to use the absolute value.  The reason 
for using the negative and postive counterparts are to determine which 
type of directory it is (and therefore which table the meta information 
is stored in).  Stupid me for not catching that first!


   




 






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




[PHP] Re: Trapping PHP Errors

2003-01-13 Thread Robert Samuel White
Use the error_reporting function to define which errors you would like 
PHP to report to the error handler.  If you want everything to be mailed 
to you, including warnings, use the E_ALL setting, though you may get a 
lot more warnings than you expect this way:

error_reporting(E_ALL);

function ErrorHandler($_ErrorNumber_, $_ErrorString_, $_ErrorFile_, 
$_ErrorLine_)
{
   mail(...);
}

set_error_handler(ErrorHandler);



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



[PHP] cprelogin cookie data

2003-01-13 Thread Robert Samuel White
Hello.  I have set up my website to log all cookie data that it 
encounters.  I have session management support built in without using 
cookies.  And my website does not use any cookies independently 
whatsoever.  For some reason, it logs a cookie with the following data:

cprelogin = no

I searched the entire php website and mailing list with the search term 
cprelogin without any results.  Does someone know why PHP would return 
this data as part of the $_COOKIE array?

-Samuel




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



[PHP] request for help/advice (xml/php content management)

2002-12-04 Thread Robert Samuel White

Hello, I am the creator of eNetwizard Content Management Server, an open
source content management system using the LAMP suite.  I am getting
ready for its first major release and have come across some problems
that I need to address first...  I'm not really sure where to start this
is such a *huge* project...

Some preliminary information about the project can be found here:

http://projects.enetwizard.net/cmserver.ehtml
http://sourceforge.net/docman/display_doc.php?docid=12504group_id=59790

Content is stored as XML in files within a matrix folder.  eNetwizard
defines several scopes allowing templates and content to be generated on
the fly in a scopeable manner.  For example, any website at
enetwizard.net has the same look and feel because of the domain scope
matrix file; I have made this file publicly accessible if you go here:

http://www.enetwizard.net/matrix1.php

Another scope is the page scope which is where the main content for a
page is located, so for the default page at enetwizard.net, it looks
like this file:

http://www.enetwizard.net/matrix2.php

This allows the server to automatically assemble and render content in a
variety of formats as you can see here:

http://www.enetwizard.net/default.exml   (as XML)
http://www.enetwizard.net/default.ehtml  (as HTML)

This is the main idea behind general content stored by the server --
there are other ways of doing things that are even more advanced but
they will not be discussed here.  In order for this to work, I created
an xmldoc class that can assemble all of the files together and create
the file accordingly.  It is then outputted via the server class.
Examples of these files are here:

http://www.enetwizard.net/xmldoc.php
http://www.enetwizard.net/server.php


Worth noting, the matrix files can contain PHP code, which is evaluated
in the xmldoc class to create an actual XML document.  These two classes
are in their elementary forms.  And they already have more issues than
can be tolerated for such an advanced content management system.  First
of all, I cannot use the  character anywhere because of the fact it is
an XML file.  This creates a serious problem and must be addressed.
Secondly, any errors that exist in a matrix file will effectively break
the page.  This too is a major issue that muse be addressed, especially
since it conflicts with the website wizard (which is responsible for
managing existing and new content).

I believe there must be a smarter way to do this and I would like any
feedback one might have in this arena.  I believe using regex's might be
a better solution, especially since some unique tags, such as a WIZARD
tag must replace be replaced by the xmldoc class with the actual content
of the wizard it is referencing, same scenario for the OBJECT tag
(which are customizable web applications), etc.  At present this cannot
work the way I have it set up.

I cannot make a public release until this is fixed stably and fully
productive.  I am looking for someone who can help me with this XML
stuff, and other competent programmers who would like to volunteer for
this project.  And I'm always interested in those who can translate both
the localization files (eNetwizard supports any language) and the main
network (enetwizard.net) into other languages.  Please contact me if you
can help.  Thanks!

If you have any questions, please feel free to ask them.

Robert Samuel White
eNetwizard Technical Services
284 Walnut
Highland, Michigan  48357
+1 (248) 889-6363
www.rswfire.com
www.enetwizard.net
 



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




[PHP] request for help/advice (xml content management)

2002-12-03 Thread Robert Samuel White
Hello, I am the creator of eNetwizard Content Management Server, an open
source content management system using the LAMP suite.  I am getting
ready for its first major release and have come across some problems
that I need to address first...  I'm not really sure where to start this
is such a *huge* project...

Some preliminary information about the project can be found here:

http://projects.enetwizard.net/cmserver.ehtml
http://sourceforge.net/docman/display_doc.php?docid=12504group_id=59790

Content is stored as XML in files within a matrix folder.  eNetwizard
defines several scopes allowing templates and content to be generated on
the fly in a scopeable manner.  For example, any website at
enetwizard.net has the same look and feel because of the domain scope
matrix file; I have made this file publicly accessible if you go here:

http://www.enetwizard.net/matrix1.php

Another scope is the page scope which is where the main content for a
page is located, so for the default page at enetwizard.net, it looks
like this file:

http://www.enetwizard.net/matrix2.php

This allows the server to automatically assemble and render content in a
variety of formats as you can see here:

http://www.enetwizard.net/default.exml   (as XML)
http://www.enetwizard.net/default.ehtml  (as HTML)

This is the main idea behind general content stored by the server --
there are other ways of doing things that are even more advanced but
they will not be discussed here.  In order for this to work, I created
an xmldoc class that can assemble all of the files together and create
the file accordingly.  It is then outputted via the server class.
Examples of these files are here:

http://www.enetwizard.net/xmldoc.php
http://www.enetwizard.net/server.php


Worth noting, the matrix files can contain PHP code, which is evaluated
in the xmldoc class to create an actual XML document.  These two classes
are in their elementary forms.  And they already have more issues than
can be tolerated for such an advanced content management system.  First
of all, I cannot use the  character anywhere because of the fact it is
an XML file.  This creates a serious problem and must be addressed.
Secondly, any errors that exist in a matrix file will effectively break
the page.  This too is a major issue that muse be addressed, especially
since it conflicts with the website wizard (which is responsible for
managing existing and new content).

I believe there must be a smarter way to do this and I would like any
feedback one might have in this arena.  I believe using regex's might be
a better solution, especially since some unique tags, such as a WIZARD
tag must replace be replaced by the xmldoc class with the actual content
of the wizard it is referencing, same scenario for the OBJECT tag
(which are customizable web applications), etc.  At present this cannot
work the way I have it set up.

I cannot make a public release until this is fixed stably and fully
productive.  I am looking for someone who can help me with this XML
stuff, and other competent programmers who would like to volunteer for
this project.  And I'm always interested in those who can translate both
the localization files (eNetwizard supports any language) and the main
network (enetwizard.net) into other languages.  Please contact me if you
can help.  Thanks!

If you have any questions, please feel free to ask them.

Robert Samuel White
eNetwizard Technical Services
284 Walnut
Highland, Michigan  48357
+1 (248) 889-6363
www.rswfire.com
www.enetwizard.net
 



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




RE: [PHP] Session Management

2002-11-03 Thread Robert Samuel White
I already know how best to go about this.  I've been up too long to
explain this now.  But since eNetwizard Content Management Server is an
open source project, you'll be able to make use of its code if you so
choose, just wait till I release the next version.  ;-)

Session Management for eNetwizard is handled by the $State class, so it
shouldn't be too hard for others to make use of it independently for
their own projects.

-Samuel | http://enetwizard.net


-Original Message-
From: John W. Holmes [mailto:holmes072000;charter.net] 
Sent: Sunday, November 03, 2002 9:56 AM
To: 'Robert Samuel White'; [EMAIL PROTECTED]
Subject: RE: [PHP] Session Management

 These were all the same assumptions I made, thanks.  I knew that it
was
 more of an HTTP thing than a PHP thing when it came to the blind
 faith thing...  I was just hoping that was something better out
 there.  I'm not willing to use session management as blindly as it is
 currently implemented.  I will find my own solution.

If you find a better method, please let everyone know. But I think this
is about the best you can do over HTTP. 

---John Holmes...







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




RE: [PHP] Session Management

2002-11-02 Thread Robert Samuel White
I am quite aware that IP's are not the way to go, and why.  That is why
I asked about the internal ways PHP handles sessions.  Thanks.

Creating a jump page as you call it does not answer the fundamental
question concerning the security of session management, and that is the
basis of what I want to discuss.

-Original Message-
From: Jonathan Sharp [mailto:js-lists;sharpmedia.net] 
Sent: Saturday, November 02, 2002 3:16 AM
To: Robert Samuel White
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Session Management

first off: IP addresses are not the way to go about this AT ALL. Even if
they are behind a proxy, they would most likely be running on a private
subnet (say 10.0.0.x) and worse yet, if a company has multiple backbones
(like the one I consult at) traffic could go through one of 3 gateway
routes (different IP's) and thus i'd end up with 1 of three sessions!?
Also i could just go through and guess id's since they're a relatively
small set. (Easily scripted to probe for sessions)

Creating a 'jump' page is your best bet to cross domains and pass the
session id in the url, and then set the id for that domain. There should
not be any issues if they use the same session store, etc.

As for the internals of php's sessions, I'll leave someone else to
answer that.

-js


Robert Samuel White wrote:
 I'm looking for some well thought out advice on session management.
 
 I've created a class for handling session management across an
unlimited
 number of domains (without using cookies) however it has some inherent
 problems.  In order to differentiate between users, it is using the IP
 Address.  I realize this is completely inefficient, and I was hoping
 that someone could give me some pointers on how exactly PHP handles
 session management from the backend.  When not using cookies, PHP
 propagates the Session ID in the URL and a hidden variable in forms.
 However, is this even safe?  Or is this completely blind faith that
the
 Session belongs to that person?
 
 Basically, I want to know if PHP *knows for sure* the right user is
 using the right session.  In other words, can it detect hijacked
 sessions?  My guess is a resounding no.
 
 I'm wondering if there is some way to determine the real IP Address of
a
 user, even if that user is behind a proxy farm, etc., and if this is,
in
 fact, what PHP does.
 
 If not, I'm stuck with figuring out how best to accomplish my goals
 using cookies.  The problem:  a cookie can only bet set for a single
 domain; therefore, the session will not be carried with the person if
 they browse to another domain which also uses the same eNetwizard
 Content Management Server.  A possibility is to always propagate a
State
 Id with the URL and forms, however even this would not prevent the
exact
 same problem:  Is this blind faith?
 
 If you can point me to any excellent resources on the state of session
 management on the web and how to do this securely, please let me know.
 
 -Samuel | http://enetwizard.net
 
 
 
 








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




RE: [PHP] Session Management

2002-11-02 Thread Robert Samuel White
These were all the same assumptions I made, thanks.  I knew that it was
more of an HTTP thing than a PHP thing when it came to the blind
faith thing...  I was just hoping that was something better out
there.  I'm not willing to use session management as blindly as it is
currently implemented.  I will find my own solution.

-Original Message-
From: John W. Holmes [mailto:holmes072000;charter.net] 
Sent: Saturday, November 02, 2002 7:42 AM
To: 'Robert Samuel White'; [EMAIL PROTECTED]
Subject: RE: [PHP] Session Management

 I've created a class for handling session management across an
unlimited
 number of domains (without using cookies) however it has some inherent
 problems.  In order to differentiate between users, it is using the IP
 Address.  I realize this is completely inefficient, and I was hoping
 that someone could give me some pointers on how exactly PHP handles
 session management from the backend.  When not using cookies, PHP
 propagates the Session ID in the URL and a hidden variable in forms.
 However, is this even safe?  Or is this completely blind faith that
the
 Session belongs to that person?

It's blind faith, just like every other system. That's the nature of
HTTP. PHP makes a unique session id that it passes around to identify
the user and link all of the requests. 

 Basically, I want to know if PHP *knows for sure* the right user is
 using the right session.  In other words, can it detect hijacked
 sessions?  My guess is a resounding no.

No...and neither can any program you write that uses HTTP. The only
thing you can do is make it unique enough so that it can't be hijacked. 

 I'm wondering if there is some way to determine the real IP Address of
a
 user, even if that user is behind a proxy farm, etc., and if this is,
in
 fact, what PHP does.

No. The PHP session management isn't related to IP at all, that I know
of. It shouldn't have to be because of the problem with proxies and
people having changing IPs or people sharing IP addresses.

 If not, I'm stuck with figuring out how best to accomplish my goals
 using cookies.  The problem:  a cookie can only bet set for a single
 domain; therefore, the session will not be carried with the person if
 they browse to another domain which also uses the same eNetwizard
 Content Management Server.  A possibility is to always propagate a
State
 Id with the URL and forms, however even this would not prevent the
exact
 same problem:  Is this blind faith?

If you want the session to maintain over different domains, your only
option is to pass the unique id in the URL or POST data. It's just as
safe as cookies, but, like you said, you can't pass cookies across
domains. 

Put everything behind SSL and that's as secure as you can get. 

Hopefully I'm not too confusing. Feel free to ask more questions.

---John Holmes...






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




[PHP] Session Management

2002-11-01 Thread Robert Samuel White
I'm looking for some well thought out advice on session management.

I've created a class for handling session management across an unlimited
number of domains (without using cookies) however it has some inherent
problems.  In order to differentiate between users, it is using the IP
Address.  I realize this is completely inefficient, and I was hoping
that someone could give me some pointers on how exactly PHP handles
session management from the backend.  When not using cookies, PHP
propagates the Session ID in the URL and a hidden variable in forms.
However, is this even safe?  Or is this completely blind faith that the
Session belongs to that person?

Basically, I want to know if PHP *knows for sure* the right user is
using the right session.  In other words, can it detect hijacked
sessions?  My guess is a resounding no.

I'm wondering if there is some way to determine the real IP Address of a
user, even if that user is behind a proxy farm, etc., and if this is, in
fact, what PHP does.

If not, I'm stuck with figuring out how best to accomplish my goals
using cookies.  The problem:  a cookie can only bet set for a single
domain; therefore, the session will not be carried with the person if
they browse to another domain which also uses the same eNetwizard
Content Management Server.  A possibility is to always propagate a State
Id with the URL and forms, however even this would not prevent the exact
same problem:  Is this blind faith?

If you can point me to any excellent resources on the state of session
management on the web and how to do this securely, please let me know.

-Samuel | http://enetwizard.net




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




[PHP] Re: the xml functions [worth a read]

2002-10-25 Thread Robert Samuel White
Thank you for your response.  First of all, I'm not sure if you are
familiar, but I am working on a project called eNetwizard Content
Management Server.  More is available here:
http://www.sourceforge.net/projects/enetwizard/
 
Content is stored as XML, but not in the usual manner.  eNetwizard is
able to manage an unlimited number of domains and websites from a
central web environment.  It does this because it acts as a web server
and determines what content to deliver based on the URL string.  Content
is stored in a matrix folder like this:
 
/matrix
/matrix/net
/matrix/net/enetwizard
/matrix/net/enetwizard/www
 
In this manner, all content for www.enetwizard.net
http://www.enetwizard.net/  is stored in the
/matrix/net/enetwizard/www folder.  However, it is even more complicated
than that.  Content is compiled by scope.  /matrix is considered the
global scope.  /matrix/net/enetwizard is in the domain scope.
/matrix/net/enetwizard/www is in the website scope.  And the files in
that directory are in the page scope.  Each of these directories can
have a file (_.rsw) which is a part of the eNetwizard XML that is
compiled.  It must be fully-conformant XML and this is determined by the
class I wrote to validate it.  My understanding is that PHP does not
have the ability to use DTD's - am I wrong about this?





Anyway, the reason for the scope is to build complex templates and
pages.  For example, maybe you want a copyright at the bottom of every
page that is on the enetwizard.net domain - you simply put it in the
TAIL section of the domain scope .RSW file.  When eNetwizard is
called, it compiles it all, validates it, and then converts it to HTML
(or anything else you want it to really).
 
Here's an example:
 
www.natural-law.net/default.exml  (this file is the result of compiling
and validating the .RSW files)
 
www.natural-law.net/default.ehtml  (this file is the result of
converting it)
 
Now, to get to what I'm trying to get at:  I understand that XML used
the ampersands as reserved words.  This is a good thing in most
instances, because it will be nice to define these entities, but how do
I do that with the limitations of the PHP parser functions?  And what is
the way around this?  I believe that the way I have things set up now, I
would like it to simply treat them as CDATA, because these can be dealt
with in the $Server class later on (when doing the conversions to HTML,
etc.)
 
Also, in order to validate the DTD (that I could make if PHP can work
with it) - it would have to wait till after the compilation of the .RSW
files - the .RSW files are also parsed as XML and first put into an
associative array - it organizes them by their main grouping and scope
-- STYLE, META, HEAD, BODY, and TAIL -- it works really
nicely, as those two links will show...
 
If you'd like to see the code for these two classes, let me know, and
I'll send them to you, and you can see how I have this set up.  It may
help to have a more interactive tour of how all of this works, but I
haven't gotten that far in the project yet.  I just finished the last of
the core (this XML stuff) and am about to start creating the wizards
(management panels) for the project, then the documentation, then the
release...
 
Thanks very much if you can give me an idea on how to tackle this unique
issue.
 
-Samuel
 
 
Robert Samuel White wrote:
 I am having a hard time understanding one of the features of the xml
 parser functions.
  
 If the string I am parsing includes nbsp; or something similar, it
 encounters an error.  I've read the docs and I don't understand how to
 have the parser process these.  Any advice would be great.
 
 
Basically, unless you've coded something to deal with them ampersands 
are the ultimate reserved word in XML. The easiest way to deal with them

is to scrub them to amp;nbsp; before they go through the XML parser.
 
The right way to deal with them is to define nbsp; as a valid entity 
in your DTD and make sure that all XML strings have a DTD when they are 
fed through the parser.
 
J Wynia
phpgeek.com
 



[PHP] re: mail form

2002-10-25 Thread Robert Samuel White
You need to use $_POST[numele] instead of $numele - that or edit your
php.ini file.
 
 
 
Now I noticed that I can't take any variable from another file. It's my
programs fault or I have to modify something in Apache or PHP?
 
--
Trasca Ion-Catalin
Trasca Ion-Catalin [EMAIL PROTECTED] wrote in message
news:20021025100207.89943.qmail;pb1.pair.com...
 Why my mail prcessing script don't recognize the value from the form
file.
 If I call the $numele variable it's just output a null.
 This is the form.html
 html
 head
 titleNumele/title

 body
 form name=form method=post action=mail.php

   p align=centerNume:
 input name=numele type=text value=Cum vrei tu
   /p
   div align=center
 input type=submit name=Submit value=Trimite
   /div
 /form
 /body
 /html
 And this is mail.php
 html/headtitleMesajul este trimis/title
 ?php
 $email = Nume:\t$numele;
 $to = [EMAIL PROTECTED];
 $subject = Nume;
 # mail($to, $subject, $email);
 ?
 /head
 bodydiv align=justify
  ? echo (Ai trimis numele $numele); ?

 /div
 /body
 /html
 the mail command is commentet for testing purpose, I don't want to
receive
a
 e-mail every time I test the script.

 --
 Trasca Ion-Catalin




[PHP] BAD FILE DESCRIPTOR

2002-10-02 Thread Robert Samuel White

I keep receiving the following error when I try to use fopen() to a
remote server, regardless of which server I try to connect to
apparently.
 
I've verified that allow_url_fopen is set to true, so this should be
functioning properly.
 
I'm only trying to read the contents of the file so why doesn't this act
like a web browser would?

I can browse to the location with my web browser, but I cannot get the
contents of the file with PHP.
 
Why is this happening to me?
 
The error is bad file descriptor
 
 



[PHP] (bad file descriptor) is a BUG

2002-10-02 Thread Robert Samuel White

I was able to work around this solution by using it on a different
server with a different version of PHP.
 
I decided to do this after reviewing the search results at Google.com
 
This is a known bug that the PHP development team has chosen to ignore,
as this article clearly outlines:
 
http://www.phpbuilder.com/mail/php-developer-list/2001041/0904.php
 
 



[PHP] PHP/XML (Validation)

2002-09-04 Thread Robert Samuel White

Hello,
 
From reading the docs on XML functions for PHP, I understand that
validation is not included.  Does any one know where there is a package
for PHP that is already developed or resources where I can learn how to
do this myself?
 
Thank you.
 
-Samuel
 



[PHP] Introducing eNetwizard Server: An Open Source Project for Users of PHP

2002-08-14 Thread Robert Samuel White
 will be releasing the first Alpha release of eNetwizard within the
next few weeks. 

eNetwizard still has a long way to go before it meets its full
potential. I am currently actively seeking competent volunteer
programmers who would like to contribute to this project. Those
programmers whom I select to work on this project side-by-side with me
will receive substantial recognition for their efforts. If you are
interested, please contact me with detailed information about your
skills and the projects that you have been involved in. If you are an
active SourceForge user, even better! I need assistance with many of the
different sub projects as well as individuals who can translate English
into other languages; I would like to make eNetwizard portable to as
many languages as possible. If you have experience in documentation or
other areas of project development, I would love to hear from you as
well. Some of the things that need to be done are simple, while others
are quite complex. For instance, eNetwizard needs a multifaceted parser
for dealing with dynamic content. There are many, many different things
that need to be done. 

For those of you who are curious about just trying out the software, it
will be available for download very soon; the core of eNetwizard is
pretty much a complete project, now it's just time for expanding it. 

For information about its release, you can sign up for the mailing list
by following the links below. I look forward to hearing from you! 

Robert Samuel White 

[EMAIL PROTECTED] 
[EMAIL PROTECTED] 

eNetwizard Open Source Project Website:
http://enetwizard.sourceforge.net 

eNetwizard Project Information:
http://sourceforge.net/projects/enetwizard/ 

eNetwizard General Mailing List:
http://lists.sourceforge.net/lists/listinfo/enetwizard-general 

eNetwizard Developers Mailing List:
http://lists.sourceforge.net/lists/listinfo/enetwizard-developers



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




Re: [PHP] Dynamic Document Creation

2001-12-07 Thread Robert Samuel White

These forms are for offline distributionthe information in the form 
is collected from an online database...

 On Friday 07 December 2001 09:43 am, you wrote:
  Does anyone have any scripts or know a location to point me to 
where I can
  dynamically create Microsoft Word documents using PHP.  
 
 You said you wanted to create some nicely formatted forms -- what's 
wrong 
 with HTML and style sheets?  Assuming you have some control over your 
end 
 users' browsers, you should be able to create a well-formatted, easy-
to-use 
 HTML form no problem.
 
 Otherwise, I'd look at LaTeX or maybe DocBook format.  
 
 --kurt
 
 -- 
 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: php-list-
[EMAIL PROTECTED]
 
 
 



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




Re: [PHP] Dynamic Document Creation

2001-12-07 Thread Robert Samuel White

Thank you, Valentin.  Your solution sounds like the one I am looking 
for!



 It's from manual do not remember it's chapter exactly:
 
 // starting word
 $word = new COM(word.application) or die(Unable to instanciate 
Word);
 print Loaded Word, version {$word-Version}\n;
 
 //bring it to front
 $word-Visible = 1;
 
 //open an empty document
 $word-Documents-Add();
 
 //do some weird stuff
 $word-Selection-TypeText(This is a test...);
 $word-Documents[1]-SaveAs(Useless test.doc);
 
 //closing word
 $word-Quit();
 
 //free the object
 $word-Release();
 $word = null;
 //
--
 -
 So you can develop this example into powerful tool for generating 
Word %(
 Documents. I advise you to find MS Word DOM Handbook to make your task
 easier...
 
 Zliy Pes, http://zliypes.com.ua
 
 
 - Original Message -
 From: [ rswfire ] [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, December 07, 2001 7:43 PM
 Subject: [PHP] Dynamic Document Creation
 
 
  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: php-list-
[EMAIL PROTECTED]
 
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: php-list-
[EMAIL PROTECTED]
 
 
 



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




[PHP] New Page Escape Sequence

2001-12-03 Thread Robert Samuel White


I wish to take some information out of a database and create a text 
file with the information, nicely formatted.  Does any one know of an 
escape sequence that works as a new page indicator for printing???

-- 
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: Re[2]: [PHP] Preventing a form from being submitted twice

2001-12-01 Thread Robert Samuel White

Well, that's kinda hard to do.  You should start by looking at the
session management functions of PHP.  Then, track your sessions by
creating a table in a database.  Then, once you are doing that...you
will have a session id associated with any individual using your
website.  Once that individual submits an entry, save the session id
with the order and don't allow them to submit another order since their
session id is already stored.

-OR-

If you only want them to be able to submit ONE ORDER EVER, then create a
cookie on their computer (that lasts for a year) once they have
completed the transaction and check for the cookie every time someone
tries to submit an order.  IF the cookie exists, then prevent the order
from processing.

Hope this helps.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, December 01, 2001 4:51 AM
To: php-general
Subject: Re[2]: [PHP] Preventing a form from being submitted twice


could you give me a few more words to point me in the right direction

Saturday, December 01, 2001, 1:41:49 AM, you wrote:

Se Two Words:  Session Management

 How can I prevent somebody from using the back button after they fill

 in a form and it takes them to a second page that checks there data 
 using php code. I don't what them to be able to resubmit the info a 
 second time with different information to be able to get the data 
 that they are buying. Hope this makes since to what I am asking
 
 
 
 --
 Best regards,
  rdkurth  mailto:[EMAIL PROTECTED]
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: php-list-
Se [EMAIL PROTECTED]
 
 
 




-- 
Best regards,
 rdkurthmailto:[EMAIL PROTECTED]


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




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




RE: [PHP] PHP and XML

2001-11-29 Thread Robert Samuel White

XML By Example Second Edition, published by Que, written by Benoit
Marchal, is the best resource out there in my opinion.  This book was
used in one of my college courses.

-Original Message-
From: Tom Malone [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, November 29, 2001 7:13 PM
To: PHP List
Subject: [PHP] PHP and XML


Can anyone recommend a good book on XML, maybe from a PHP perspective?

Tom Malone



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




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