coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: ace09041982 on June 07, 2006, 09:43:21 AM

Title: cannot update admin.php
Post by: ace09041982 on June 07, 2006, 09:43:21 AM
Hi all, i have made a new installation of coppermine gallery 1.4.7, in a sub folder with a brand new sql database as per the instructions, however, when i click config i am taken to the admin.php page, i change the settings that i need to change but when i click on "save new configuration" i get taken to a page thaty says

<quote>

  The resource cannot be displayed
The resource you are looking for cannot be opened by your browser.

--------------------------------------------------------------------------------

Please try the following:

Click the  Back button to try another link.
Click  Search to look for information on the Internet.




HTTP Error 406 - Not acceptable
Internet Explorer 
<end quote>

When i click back i have an error on page icon at the bottom of internet explorer

details are

line:   97
Char:  9
error:  'Hideall' is undefined
code:  0

can anyone advise what might be the problem

thanks

ace09041982
Title: Re: cannot update admin.php
Post by: Joachim Müller on June 07, 2006, 09:50:57 AM
Link?
Title: Re: cannot update admin.php
Post by: ace09041982 on June 07, 2006, 09:52:49 AM
http://www.wonderfulolsens.co.uk/gallery/
Title: Re: cannot update admin.php
Post by: ace09041982 on June 07, 2006, 10:09:57 AM
tried using firefox an got this....

Not Acceptable
An appropriate representation of the requested resource /gallery/admin.php could not be found on this server.

Apache/1.3.36 Server at www.wonderfulolsens.co.uk Port 80
Title: Re: cannot update admin.php
Post by: Joachim Müller on June 07, 2006, 10:22:26 AM
try renaming the file to something else (e.g. "foobar.php") and access it manually (by typing in the address into your browser's address bar). Then try submitting the form again.
Title: Re: cannot update admin.php
Post by: ace09041982 on June 07, 2006, 10:52:35 AM
still comes up with the same message.


Not Acceptable
An appropriate representation of the requested resource /gallery/foobar.php could not be found on this server.

Apache/1.3.36 Server at www.wonderfulolsens.co.uk Port 80
Title: Re: cannot update admin.php
Post by: Joachim Müller on June 07, 2006, 10:54:02 AM
H, I guess you should ask your webhost for support then.
Title: Re: cannot update admin.php
Post by: ace09041982 on June 07, 2006, 06:49:25 PM
is there a way to replace a no with a yes in another file eg. config.inc.php that means that i don't use the interface?
Title: Re: cannot update admin.php
Post by: Tranz on June 07, 2006, 10:24:08 PM
Not sure what you are asking.
Title: Re: cannot update admin.php
Post by: Paver on June 07, 2006, 10:33:03 PM
"hideall" is a javascript function in scripts.js.  When I try to load your scripts.js file, I get the same 406 error message: http://www.wonderfulolsens.co.uk/gallery/scripts.js (http://www.wonderfulolsens.co.uk/gallery/scripts.js).  On my galleries, I can load scripts.js fine.

So check the permissions on scripts.js to make sure it's readable by all (and possibly executable by all).

But since this is a 406 error, it might be a webhost setting.  I would expect a "permission denied" message if the permission were set incorrectly.
Title: Re: cannot update admin.php
Post by: ace09041982 on June 08, 2006, 07:28:39 AM
there must be a file that the admin writes to. (e.g. the changes made in admin.php are written to a file called settings.php)  Can i not edit the settings file directly instead of using the admin page as an interface to write the setting.
Title: Re: cannot update admin.php
Post by: Paver on June 08, 2006, 07:39:52 AM
There is no settings file.  The admin config panel settings are written to the database table cpg_config (where "cpg_" at the beginning may be different depending upon your table prefix setting).

You can modify the database tables directly using a MySQL tool like phpMyAdmin.  This is very clumsy though as there are many settings.

But if your problem is scripts.js, then you'll find that things like the full-size image pop-up window will give the same error.
Title: Re: cannot update admin.php
Post by: ace09041982 on June 08, 2006, 07:45:33 AM
so the problem is accessing the scripts.js file and this would be a webhost problem
Title: Re: cannot update admin.php
Post by: Paver on June 08, 2006, 08:02:39 AM
That's my guess. For some reason, your webserver is blocking access to that file or file type.  You could try to use another javascript file on your site and see what happens.

For Coppermine, you could copy the functions in scripts.js into your themes/yourtheme/template.html file, making sure to remove the line referencing the file:
<script type="text/javascript" src="scripts.js"></script>

Actually, try removing that line and see what happens.  Usually a web page that cannot find a javascript function will just ignore it and move on.

For the admin.php page, you don't need the hideall() and show_section() functions because if they don't exist, the config panel will just have all its sections open.
Title: Re: cannot update admin.php
Post by: Tranz on June 08, 2006, 08:13:07 AM
I think I've seen cases where the server blocked because of the name, scripts. Try renaming the file to something like coolstuff.js and edit the template.html file accordingly.
Title: Re: cannot update admin.php
Post by: ace09041982 on June 08, 2006, 08:19:58 AM
i just looked through foobar.php (previously named admin.php) and there is no word in the file called hideall() or show_section(), could my admin file screwed?
Title: Re: cannot update admin.php
Post by: Tranz on June 08, 2006, 08:25:16 AM
Can you rename the .js file and see if you get the same 406 error when you go to it directly?
Title: Re: cannot update admin.php
Post by: ace09041982 on June 08, 2006, 08:33:10 AM
i tried re-uploading admin.php, edited the template file to change the scripts.js to gallery.js, edited the admin.php file to change the scripts.js to gallery.js logged in to admin and all the catagorys were collapsed, (which had not been before).
BUT when i clicked save new config, i got the same message again

  The resource cannot be displayed
The resource you are looking for cannot be opened by your browser.

--------------------------------------------------------------------------------

Please try the following:

Click the  Back button to try another link.
Click  Search to look for information on the Internet.




HTTP Error 406 - Not acceptable
Internet Explorer 
Title: Re: cannot update admin.php
Post by: Tranz on June 08, 2006, 08:45:24 AM
Hmm... something is still referencing scripts.js. I am able to access http://www.wonderfulolsens.co.uk/gallery/gallery.js just fine. I did a search for scripts.js and I don't see where else it might be causing the problem. My admin.php doesn't have reference to scripts.js so I don't understand how you were able to edit what you said you did.

I'm guessing that there might be some caching. Try using another browser or clear your cache. If you still have the problem, delete the scripts.js file to see if you get a 404 instead of 406.
Title: Re: cannot update admin.php
Post by: ace09041982 on June 08, 2006, 01:34:24 PM
deleated the entire installation, reinstalled the new updated 1.4.8, got the same thing again, changed the allow user reg in phpmysql, deleted the scripts, still getting err406, tried another browser and still err 406
Title: Re: cannot update admin.php
Post by: Tranz on June 08, 2006, 02:30:41 PM
I think you need to ask your webhost if you can use Coppermine on its servers, given its security setup.
Title: Re: cannot update admin.php
Post by: ace09041982 on June 08, 2006, 02:58:14 PM
they already use it but it is supplied by fantistico but is 1.4.2 and acording to a previous thread i should not use fantistico for setup, anyway.  the same thing happens with the fantistico version aswell.
Title: Re: cannot update admin.php
Post by: Tranz on June 08, 2006, 03:19:16 PM
Well unless they review/revise their security settings, it doesn't seem like Coppermine can be run out of the box on their servers. Maybe someone here can figure out the source of the error even after renaming the file.

If they won't change things, they should remove it from Fantastico. Otherwise, those users are going to come here asking for support when there is nothing we can do for them.
Title: Re: cannot update admin.php
Post by: Paver on June 08, 2006, 04:20:33 PM
You can put all the JavaScript in template.html instead of linking it in an external file.  Have you tried this?
Title: Re: cannot update admin.php
Post by: ace09041982 on June 08, 2006, 05:00:05 PM
no, it is still not saving changes, just comming back with err 406, however,  i have got this from web host support dept:

php

Hello,
We are looking into your issue. Please hold on.
We shall update you soon.
Thank you,
Regards,
Sankar


Title: Re: cannot update admin.php
Post by: ace09041982 on June 09, 2006, 04:18:15 PM
Hi all, IT'S FIXED!!!!!

turns out it was my webhost.  I have included the info from my webhost so this topic my be posted to an FAQ in the future.

Thanks all for the help

php

Hello,

The issue was due to a pattern match in one of the configuration files.
We have removed the rule and it now working fine.
Please verify. Get back to us if you still have issues.
Thank you for the co-operation.

Regards,
Ginsy.



php

Hello,
The configuration file had probably words that were blocked by Mod Security in the server.
The rules corresponding to those words have been altered.
So now mod security does not block access to those files.

Thank you,
Regards,
Sankar