Problems with Javascript Commands causing Runtime Errors Problems with Javascript Commands causing Runtime Errors
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Problems with Javascript Commands causing Runtime Errors

Started by ericsj, November 29, 2004, 06:34:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ericsj

I solved this one on my own after searching the forum and finding no similar solutions.  So I thought I'd post what I figured out.

Problem:[/u]
When clicking on photo gallery actions that require javascript (View fullsize photo, Show/Hide photo info, etc.), I'd get a runtime error.  Upon further investigation, I realized that the browser was being denied access to scripts.js altogether, which obvisouly causes this problem.

Anyway, I saw people here with similar problems -- the only solution being "make sure you have scripts.js being included in your template.html". 

Solution:[/u] (for me anyway)

Some people (such as myself) using Apache to host a web site have added a line to their .conf file similar to this:

RedirectMatch (.*)/(scripts|root.exe|cmd.exe|default.ida).* /goaway.html

This line's purpose is along the lines of denying malicious worms potential access to vulnerable files/folders on many web servers.  Suggested by many web sites during Nimda's outbreak to be added to Apache .conf files.

Of course, since then I had forgotten that it was there -- and as you can see it was set up to deny any HTTP request with "scripts" anywhere in it. 

Maybe that will help nobody else at all, but there might be some people with that line in their .conf that are unaware that it is causing them problems with CPG working correctly out of the box.

Hope that helps!  Anybody else find this to be a problem?

- Eric

Joachim Müller

you can't properly run coppermine (at least the admin section) with JavaScript disabled. Add an exception to your apache conf rules that allows certain Scripts (basically all Coppermine files). There's no other solution available - you can't drive a car with 5 pairs of gloves on, sorry.

Joachim