cancel
Showing results for 
Search instead for 
Did you mean: 

location for CSS files?

Cplusplus
Dabbler
Posts: 10
Registered: ‎19-01-2009

location for CSS files?

I've just installed a Wiki in my CGI space under ~/cgi-bin/wiki and it all seems to be working.
However, the CSS in ~/cgi-bin/wiki/css are not working. The server seems to be trying to 'execute' the CSS files. The permissions are right as far as I can tell. Can anyone tell me where I'm going wrong?
Thanks.
7 REPLIES 7
Ben_Brown
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: location for CSS files?

You shouldn't install "normal" files in the cgi-bin, including php. Files like this should be installed into your home directory, or a subdirectory of it.
Tony_W
Grafter
Posts: 745
Registered: ‎11-08-2007

Re: location for CSS files?

@CplusPlus
What server are you trying to set up on - ccgi or PAYH?
Tony
Cplusplus
Dabbler
Posts: 10
Registered: ‎19-01-2009

Re: location for CSS files?

Quote from: Ben
You shouldn't install "normal" files in the cgi-bin, including php. Files like this should be installed into your home directory, or a subdirectory of it.

Ah, OK. So I don't need the cgi account at all? I was under the impression that PHP needed to be executed in the cgi-bin directory.
I'll try again tonight, but using my normal webspace account instead.
Thanks.
Ben_Brown
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: location for CSS files?

Sorry I've not been clear enough here.
Bear with me for a minute, this isn't strictly true on our platform but we've done some under the bonnet tweaks so it works like this.
Traditionally, the cgi-bin is for executables, in the past these were binary applications, but you can put shell/perl scripts etc in there.
PHP is actually parsed by Apache as a module, so 'normally' they are not executable, and not executed as such.
Our platform does use the CGI version of PHP rather than the apache module, but we have made some changes in our configurations to make it appear to work as if it was using the apache module. The exception to this is that we require php files to be executable permissions wise.
The hard and fast rules is that things other than php files and static content should be OUTSIDE of the cgi-bin (but still on the cgi servers). Binaries (such as compiled c code) and perl/python/whatever scripts should be in the cgi-bin.
Hope that helps explain a bit more.
Cplusplus
Dabbler
Posts: 10
Registered: ‎19-01-2009

Re: location for CSS files?

Quote from: Ben
Our platform does use the CGI version of PHP rather than the apache module, but we have made some changes in our configurations to make it appear to work as if it was using the apache module. The exception to this is that we require php files to be executable permissions wise.

I understand.
Quote
The hard and fast rules is that things other than php files and static content should be OUTSIDE of the cgi-bin (but still on the cgi servers). Binaries (such as compiled c code) and perl/python/whatever scripts should be in the cgi-bin.
Hope that helps explain a bit more.

Yes it does. Smiley
OK. Just to be clear, if I move my ~/cgi-bin/wiki/css dir to ~/css then it should work? Assuming I can redirect the CSS requests globally...
Now where's that manual...
Ben_Brown
Grafter
Posts: 2,839
Registered: ‎13-06-2007

Re: location for CSS files?

That should work but personally I would move ~/cgi-bin/wiki to ~/wiki
As we pretend that PHP isn't using CGI this would work fine on our servers, as long as the php files are executable.
Cplusplus
Dabbler
Posts: 10
Registered: ‎19-01-2009

Re: location for CSS files?

Just to confirm that moving the css directory out of the cgi-bin path worked. I needed to change some configs in the wiki software in order to find the new location, but other than that it was easy.
Thanks.