473,396 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CSS/CGI Configuration

Hi all

I'm doing my first CSS with a CGI, and I'm haivng some configuration problems.
I'm on a Mac, Panther.

I've got a CGI that prints a head with "@import url" to connect to a
stylesheet. The
web page comes out fine, but without the stylesheet applied.

The CGI is in the systemwide cgi-bin
(/Library/WebServer/CGI-Executables), and I've
tried the stylesheet in both the systemwide web documents folder, and
my own local
web folder. Same effect - zip. I've tried little variations on the
import (slashes, etc), to
no effect. I've been advised that the @import is the correct method
(although I have no
experience here).

If I save the source of the page to a file in my local web folder, and
simply open it up as a
static page, the CSS is applied as it should be. No trouble there.

The Apache log gives me complaints about the imported file not
existing, and one
weird one about not being able to find a file called cpan.css. What the dilly?

Mike
--
"It's beyond my ken... and my Barbie, and all of my action figures."

Jul 21 '05 #1
9 6992
in comp.infosystems.www.authoring.stylesheets, Mikey wrote:
The web page comes out fine, but without the stylesheet applied


URL?

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 21 '05 #2
After serious contemplation, on or about Friday 29 April 2005 5:25 pm
ex***********************@earthlink.net wrote:
Hi all

I'm doing my first CSS with a CGI, and I'm haivng some configuration
problems. I'm on a Mac, Panther.

I've got a CGI that prints a head with "@import url" to connect to a
stylesheet. The
web page comes out fine, but without the stylesheet applied.

The CGI is in the systemwide cgi-bin
(/Library/WebServer/CGI-Executables), and I've
tried the stylesheet in both the systemwide web documents folder, and
my own local
web folder. Same effect - zip. I've tried little variations on the
import (slashes, etc), to
no effect. I've been advised that the @import is the correct method
(although I have no
experience here).

If I save the source of the page to a file in my local web folder, and
simply open it up as a
static page, the CSS is applied as it should be. No trouble there.

The Apache log gives me complaints about the imported file not
existing, and one
weird one about not being able to find a file called cpan.css. What the
dilly?

Mike

Did you use the escape character "/" in front of the "@" character? Try
"/@import "myfavorite.css: unless you are using the format"
print qq~
<html>
<body>
</body>
</html>~;

--
Later,
Darrell Stec da*****@neo.rr.com

Webpage Sorcery
http://webpagesorcery.com
We Put the Magic in Your Webpages
Jul 21 '05 #3
On 2005-04-29 17:23:38 -0400, Lauri Raittila <la***@raittila.cjb.net> said:
in comp.infosystems.www.authoring.stylesheets, Mikey wrote:
The web page comes out fine, but without the stylesheet applied


URL?


What I have is essentially

print '<style type="text/css" title="text/css">
<!--
@import url("the_stylesheet.css");
-->
</style>';

But where should the stylesheet be located?
--
"It's beyond my ken... and my Barbie, and all of my action figures."

Jul 21 '05 #4
>>
I've got a CGI that prints a head with "@import url" to connect to a
stylesheet. The
web page comes out fine, but without the stylesheet applied.

The CGI is in the systemwide cgi-bin
(/Library/WebServer/CGI-Executables), and I've
tried the stylesheet in both the systemwide web documents folder, and
my own local
web folder. Same effect - zip. I've tried little variations on the
import (slashes, etc), to
no effect. I've been advised that the @import is the correct method
(although I have no
experience here).

If I save the source of the page to a file in my local web folder, and
simply open it up as a
static page, the CSS is applied as it should be. No trouble there.

The Apache log gives me complaints about the imported file not
existing, and one
weird one about not being able to find a file called cpan.css. What the
dilly?

Mike

Did you use the escape character "/" in front of the "@" character? Try
"/@import "myfavorite.css: unless you are using the format"
print qq~
<html>
<body>
</body>
</html>~;
--


Thanks, but no joy. I put my snippet above.

It seems like doing a print '<stuff>'; in my cgi is not the
best method. I was thinking of using CGI.pm .
--
"It's beyond my ken... and my Barbie, and all of my action figures."

Jul 21 '05 #5
On 2005-04-30 02:33:52 -0400, Darrell Stec
<da**********@webpagesorcery.com> said:
After serious contemplation, on or about Friday 29 April 2005 5:25 pm
ex***********************@earthlink.net wrote:
Hi all

I'm doing my first CSS with a CGI, and I'm haivng some configuration
problems. I'm on a Mac, Panther.

I've got a CGI that prints a head with "@import url" to connect to a
s


I suddenly realized that I may have two problems here, or a problem of a
different sort.

My Apache log gives me this:
[client 127.0.0.1] File does not exist: /Library/WebServer/Documents/cpan.css
[client 127.0.0.1] File does not exist: /Library/WebServer/Documents/cpan.css
[client 127.0.0.1] script not found or unable to stat:
/Library/WebServer/CGI-Executables/the_stylesheet.css
[client 127.0.0.1] script not found or unable to stat:
/Library/WebServer/CGI-Executables/the_stylesheet.css

Now what could "cpan.css" be? It's not a file referenced by my CGI or
my stylesheet. Is
there a CPAN pm that needs to be installed, and some file put up in my
web page folder?
--
"It's beyond my ken... and my Barbie, and all of my action figures."

Jul 21 '05 #6
On 2005-04-30 02:33:52 -0400, Darrell Stec
<da**********@webpagesorcery.com> said:
After serious contemplation, on or about Friday 29 April 2005 5:25 pm
ex***********************@earthlink.net wrote:
Hi all

I'm doing my first CSS with a CGI, and I'm haivng some configuration
problems. I'm on a Mac, Panther.

I've got a CGI that prints a head with "@import url" to connect to a
s


Okay, it looks like there was a css file used for the cpan website; why Apache
is looking for it is beyond me. My browser did not have a default stylesheet
selected.

I set the default stylesheet to my CGI's, and that worked fine. Then I put the
browser back to no default, and that ended the references to cpan.css in the
Apache log. Weirdness.

However... I cannot get the @import url to work, and I figure it must be either
some fundamental setup problem with Apache.

I can get the following to work:
<link rel="stylesheet" type="text/css"
href="http://localhost/the_stylesheet.css" />

But naturally I don't want to have hard references in my CGIs.

Please excuse me as I tend to ramble in my posts. A decade of bad habits.
Mike

--
"It's beyond my ken... and my Barbie, and all of my action figures."

Jul 21 '05 #7
On 30/04/2005 14:29, Mikey wrote:

[snip]
print '<style type="text/css" title="text/css">
I don't think that text/css is a very good name for your style sheet.
The value of the title element may be presented to the user so they can
choose between alternate style sheets, so the name should be meaningful.

If you only have one overall style for the document, you could do away
with the title attribute altogether.
<!--
It is not necessary, nor really desirable, to "hide" SCRIPT or STYLE
element content anymore. This particular technique was necessary in the
past, but not any longer.
@import url("the_stylesheet.css");
[snip]
But where should the stylesheet be located?


In the same location you would expect if that were a link: the directory
of the current document. Probably /cgi-bin/, which I doubt is the most
appropriate location for a style sheet.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 21 '05 #8
Mikey wrote:

What I have is essentially
print '<style type="text/css">
@import url("the_stylesheet.css");
</style>';
But where should the stylesheet be located?


If you use full path from the DocumentRoot to the CSS file, it will
work. You are starting from the current directory which is
../cgi-executable/ and your CSS file is not there, obviously.
From your other posts I'd say the path should be
"/the_stylesheets.css". That is, you have put the stylesheet in the
DocumentRoot.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 21 '05 #9
in comp.infosystems.www.authoring.stylesheets, Mikey wrote:
Please excuse me as I tend to ramble in my posts. A decade of bad habits.


As you also didn't give URL, consider yourself not excused and plonked.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: phillip | last post by:
This is interesting, I have attached my web.config file and the exception I have been logging. I created a library which provide data access to a database and a control system. The library is...
5
by: Water Cooler v2 | last post by:
I know that we can add a single name value entry in app.config or web.config in the configuration/configSettings/appSettings section like so: <add key="key" value="value" /> Question: I want...
1
by: Jess Chadwick | last post by:
I am attempting to use the Enterprise Library (Jan 2006) Cryptography block to encrypt a credit card number in my ASP.NET 2.0 Commerce Server application. Everything is configured correctly, as...
4
by: Michael Lang | last post by:
I was basically wanting to know how to use the System.Configuration namespace to be able to load an arbitrary number of unknown attributes on an element in a custom section in the .config into a...
6
by: Jeff Hegedus | last post by:
I have a dll that requires some configuration data. I put the configuration data in a custom configuration section in a config file that is loaded in the installation folder of the dll. If I...
8
by: Alberto | last post by:
Can you tell me how to read and modify a value in the app.config file using this class? Thank you very much
7
by: Arno R | last post by:
Hi all, I am sending mail from my apps with CDO nowadays. However I have one client where this will not work until now. I am thinking this is related to the provider where the client has his...
7
by: =?Utf-8?B?RG91Z2llIEJyb3du?= | last post by:
Hi I've written custom configuration section (inherits from System.Configuration.ConfigurationSection) to simplify the contents of the config file and to make life easier when accessing them in...
3
by: Mike | last post by:
Hi I have problem as folow: Caught Exception: System.Configuration.ConfigurationErrorsException: An error occurred loading a configuration file: Request for the permission of type...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi, thanks, mister The code string rutaConfig = tbRutaConfigServicioBase.Text; '// Map to the application configuration file. ExeConfigurationFileMap configFile = New...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.