You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dag Gano <Da...@attbi.com> on 2002/11/13 08:40:45 UTC

[users@httpd] SSI var... (none)

The docs for the #echo command say, "This command prints one of the include
variables, defined below. If the variable is unset, it is printed as
(none)."

Is there any way to turn off this behavior from within the code (not by
server configuration)? If my var is empty, I want it to echo empty (nothing,
blank, null, whatever). Why would anyone want "(none)" spewed onto their web
page? This blows my whole project. Please let me know if there's a way to
stop the insanity.

Also, please pass this on to whoever makes decisions about these things. I'm
trying to be nice, but here at 11:30pm I'm finding it difficult - this seems
like a really stupid thing for anyone to intentionally code into the server.
Great for debugging, maybe, but impossible to put into production. Thanks.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] SSI var... (none)

Posted by Dag Gano <Da...@attbi.com>.
Unfortunately, I don't have that option. I'm working on a site for some
friends hosted on a server I have no control over. I've wanted to experiment
with parameterizing a site using SSI for quite a while. It was all working
great until I discovered this problem. I probably would have been much
better off just using Javascript, but the browser indpendent nature of SSI
was appealing to me. Live and learn.

 ____________________________________________________
|  Dag Gano  |  916 801-7129  |  Dag_Gano@Yahoo.com  |



-----Original Message-----
From: Zac Stevens [mailto:zts@cryptocracy.com]
Sent: Wednesday, November 13, 2002 12:21 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] SSI var... (none)


On Wed, Nov 13, 2002 at 12:05:50AM -0800, Dag Gano wrote:
> I was surprised, too. It actually puts the string "(none)" in numerous
> places where I have #echo statements in my HTML. I'm starting to code
around
> it, but it's really kludging up my code having to have every page init
every
> variable, or include a file that does it.

Interesting (and unfortunate).  I'm not familiar with the mod_include code
and couldn't find the section responsible for this behaviour in a quick
browse.  I'd agree that the documentation implies that this is not
configurable.

My other suggestion would be to reconsider whether SSI is really the most
appropriate solution to the problem.  I've always seen SSI as a very basic
approach to dynamic content generation and have used it as such.  In light
of that, I can't help but feel that if you're in the position where this
is a serious problem you may want to look at using PHP.  It's quite easy
to start out using it as a supercharged SSI but you can take it a lot
further as the need requires.

Cheers,


Zac


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSI var... (none)

Posted by Zac Stevens <zt...@cryptocracy.com>.
On Wed, Nov 13, 2002 at 12:05:50AM -0800, Dag Gano wrote:
> I was surprised, too. It actually puts the string "(none)" in numerous
> places where I have #echo statements in my HTML. I'm starting to code around
> it, but it's really kludging up my code having to have every page init every
> variable, or include a file that does it.

Interesting (and unfortunate).  I'm not familiar with the mod_include code
and couldn't find the section responsible for this behaviour in a quick
browse.  I'd agree that the documentation implies that this is not
configurable.

My other suggestion would be to reconsider whether SSI is really the most 
appropriate solution to the problem.  I've always seen SSI as a very basic 
approach to dynamic content generation and have used it as such.  In light 
of that, I can't help but feel that if you're in the position where this 
is a serious problem you may want to look at using PHP.  It's quite easy 
to start out using it as a supercharged SSI but you can take it a lot 
further as the need requires.

Cheers,


Zac


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] SSI var... (none)

Posted by Dag Gano <Da...@attbi.com>.
I was surprised, too. It actually puts the string "(none)" in numerous
places where I have #echo statements in my HTML. I'm starting to code around
it, but it's really kludging up my code having to have every page init every
variable, or include a file that does it.



-----Original Message-----
From: Zac Stevens [mailto:zts@cryptocracy.com]
Sent: Tuesday, November 12, 2002 11:54 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] SSI var... (none)


On Tue, Nov 12, 2002 at 11:40:45PM -0800, Dag Gano wrote:
> Is there any way to turn off this behavior from within the code (not by
> server configuration)? If my var is empty, I want it to echo empty
(nothing,
> blank, null, whatever). Why would anyone want "(none)" spewed onto their
web
> page? This blows my whole project. Please let me know if there's a way to
> stop the insanity.

Given the absence of quotes around '(none)' in the documentation, I would
expect that it does precisely what you want - prints nothing.  Is the
question based upon your reading of the documentation, or did you encounter
the behaviour in the course of using the echo directive?

I don't have a server with includes to test this on, but I'd be very
surprised if a literal "(none)" was printed...

HTH,


Zac

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSI var... (none)

Posted by Zac Stevens <zt...@cryptocracy.com>.
On Tue, Nov 12, 2002 at 11:40:45PM -0800, Dag Gano wrote:
> Is there any way to turn off this behavior from within the code (not by
> server configuration)? If my var is empty, I want it to echo empty (nothing,
> blank, null, whatever). Why would anyone want "(none)" spewed onto their web
> page? This blows my whole project. Please let me know if there's a way to
> stop the insanity.

Given the absence of quotes around '(none)' in the documentation, I would
expect that it does precisely what you want - prints nothing.  Is the
question based upon your reading of the documentation, or did you encounter
the behaviour in the course of using the echo directive?

I don't have a server with includes to test this on, but I'd be very
surprised if a literal "(none)" was printed...

HTH,


Zac

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] SSI var... (none)

Posted by Joshua Slive <jo...@slive.ca>.

On Tue, 12 Nov 2002, Dag Gano wrote:
> The docs for the #echo command say, "This command prints one of the include
> variables, defined below. If the variable is unset, it is printed as
> (none)."
>
> Is there any way to turn off this behavior from within the code (not by
> server configuration)? If my var is empty, I want it to echo empty (nothing,
> blank, null, whatever). Why would anyone want "(none)" spewed onto their web
> page? This blows my whole project. Please let me know if there's a way to
> stop the insanity.

There are ways to work around this in your code, mostly involving <!--#if
statements.  If you want to change it, you should be using
http://httpd.apache.org/docs-2.0/mod/mod_include.html#ssiundefinedecho
or modifying the source code yourself.  You give no idea why you rule out
any change to server configuration.

Joshua.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org