Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Protection of Configuration


stevel

Recommended Posts

This is the official support topic for the contribution Protection of Configuration

 

Please report any problems with this contribution here.

Edited by stevel
Link to comment
Share on other sites

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Oh you don't need to tell me that I fumble-fingered the name of the contribution when adding it to the downloads. I've asked Harald to fix it for me. Sigh...

Link to comment
Share on other sites

I just added the updates in your text file instructions and I get an error trying to make changes, it gives me the error;

 

Failed to change protection of Administration Panel

Failed to change protection of Catalog

 

above is the error I get when I click update.

Link to comment
Share on other sites

Try changing the protection of the files to 755 using some external method first. Another user reported that he needed to do that. You get the failed mode when the chmod call returns false.

Link to comment
Share on other sites

  • 1 month later...

I've tried it on two machines (same site contents) and it doesn't want to work on either of them.

 

Warning: chmod(): Operation not permitted in /var/www/localhost/htdocs/oscommerce-dev/admin/protection.php on line 19

Warning: Cannot modify header information - headers already sent by (output started at /var/www/localhost/htdocs/oscommerce-dev/admin/protection.php:19) in /var/www/localhost/htdocs/oscommerce-dev/admin/includes/functions/general.php on line 22

 

Rats. :mellow:

Link to comment
Share on other sites

Interesting. Did you try setting the protection to 755 manually first? I didn't need that on my site, but some others seem to have.

 

The second warning is an indirect result of the first. It coiuld be that your installation does not allow chmod from a PHP file.

Link to comment
Share on other sites

Hi all,

 

I still get this error, no matter what I do:

 

Warning: chmod(): Operation not permitted in /home/public_html/catalog/admin/protection.php on line 12

 

Warning: chmod(): Operation not permitted in /home/public_html/catalog/admin/protection.php on line 19

 

Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/catalog/admin/protection.php:12) in /home/public_html/catalog/admin/includes/functions/general.php on line 18

 

 

 

The weird thing is it actually worked the very first time I tried it after install. I got the green strip accross the top confirming that the protection was set. But now nothing I try works anymore. Anyone got any other ideas?

Edited by ciraklizer
Link to comment
Share on other sites

Hi,

thanks for responding so quickly. I've tried to chmod the two "protection.php" files to 444, 755, and 777. And I've tried to chmod the two "configure.php" files (one in catalog/includes/ the other in catalog/admin/includes) to 444, 755, and 777. And all combinations. I just get that same error over and over. I don't understand the error. What does it mean?

Thanks, really appreciate the help.

 

cc

Link to comment
Share on other sites

It means that the chmod call in protection.php is failing in a way that it doesn't just return a failure status. I have not seen this before and don't know what would cause it.

 

All I can think of is that your web host has disabled the function from PHP. If so, you can't use the contribution.

Link to comment
Share on other sites

You were right! That did the trick. This is what my ISP said:

 

Hello,

We have made some modifications in the PHP configurations in the server to do 'chmod' through PHP script. Also, we have added the line

#!/usr/local/bin/php

at the beginning of the script

/home/public_html/catalog/admin/protection.php

 

So I guess that was it.

BTW, do you think the "#!/usr/local/bin/php " makes any difference? I've never had to put that at the top of the page before and I'm running a lifetime of PHP stuff on this same server.

 

Thanks again!

 

cc

 

"I love people who love PHP"

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

 

I applied your mod and the this message:

 

Failed to change protection of Administration Panel

Failed to change protection of Catalog

 

Then I chmoded the protection.php in both locations to 755:

 

-rwxr-xr-x 1 root root 413 Aug 4 21:03 protection.php

-rwxr-xr-x 1 root root 4450 Aug 4 21:02 protection.php

 

I still contine to get the message. What am I missing?

Link to comment
Share on other sites

  • 1 month later...

Two continue this post

 

I am on a windows server with a Ensim control and it does not allow me to change chmod via FTP or via the control panel.

 

So the solution to change the configure.php chmod is not a option

 

Steve i was hoping your Contribution would help me round this problem and i get the control panel to function but then get "Permission denied " problem below

Any suggestions ?

 

PHP Warning: chmod() [function.chmod]: Permission denied in C:\Program Files\..\..\..\wwwroot\eshop\catalog\admin\protection.php on line 12 PHP Warning: chmod() [function.chmod]: Permission denied in C:\Program Files\..\..\..\Inetpub\wwwroot\eshop\catalog\admin\protection.php on line 19 PHP Warning: Cannot modify header information - headers already sent in C:\Program Files\..\..\..\Inetpub\wwwroot\eshop\catalog\admin\includes\functions\general.php on line 18

 

cheers Dick

Link to comment
Share on other sites

If your server will not allow a PHP script to change the protection, this contribution won't help. I find it somewhat odd that some servers give an error to the chmod call rather than simply returning a failure status.

 

Some people find that if they initially set the protection to 755 that the contribution then works for them. You would have to figure out how to do that on your server.

Link to comment
Share on other sites

  • 2 months later...

Hi,

 

I was getting the error message:

 

Warning: chmod(): Operation not permitted in /home/sc10771/www/admin/protection.php on line 12

 

Warning: chmod(): Operation not permitted in /home/sc10771/www/admin/protection.php on line 19

 

Warning: Cannot modify header information - headers already sent by (output started at /home/sc10771/www/admin/protection.php:12) in /home/sc10771/www/admin/includes/functions/general.php on line 18

 

..... I tried chmod'ing both configure.php files manually to 755 with my FTP client.... which was successful.... then going back to Protection of Configuration and applying the protection, but I got the same error as above.

 

I then deleted both configure.php files and reuploaded them.... now I no longer get the red warning "able to write to configure.php" when visiting the homepage, and when I click on "Protection of Configuration" under admin tools, the Protect boxes are selected (instead of Unprotected as they were before). When viewing their file permissions using my FTP client, they are both 644.

 

It will not let me change to unprotected (not that I want to) ... but are the files safe now?

 

Thanks :)

Link to comment
Share on other sites

This is the official support topic for the contribution Protection of Configuration

 

Please report any problems with this contribution here.

Seems to be a common problem. I installed everything and get the following error messages when I try to update:

 

Warning: chmod(): Operation not permitted in /[path]/protection.php on line 14

 

Warning: chmod(): Operation not permitted in /[path]/protection.php on line 21

 

Warning: Cannot modify header information - headers already sent by (output started at /[path]/protection.php:14) in /[path]/includes/functions/general.php on line 18

Link to comment
Share on other sites

If you get "operation not permitted", then your host's configuration of PHP is denying you the use of the chmod function and there's not much that can be done about it as far as this contribution is concerned. If your FTP client can change the protection, that's fine - on some hosts, such as mine, I can't use an FTP client to change the protection to what is needed.

 

The "cannot modify headers" message is a side-effect of the other warnings.

Link to comment
Share on other sites

  • 10 months later...

Hi there, like most other people here I have installed 6.15 and then I get the message at the top of the page that says " Warning: I am able to write to the configuration file: /var/www/html/osc6/includes/configure.php. This is a potential security risk - please set the right user permissions on this file."

 

So I did change the CHMOD to 644 & 755 on 2 different attempt s to fix it and still the error message persists - so I then read the forums and discover the "Protection of Configuration - Version 1.0" fix and installed it as per instructions however when I go to Tools/Protection of Configuration and select it I get this error message on the page that appears

 

Access Denied

No Right Permission Access

Please contact your Webmaster to request more access or if you found any problem.

 

Hmmm problem is I am the webmaster :( and I have no idea - any suggestions??

Your help would be much appreciated. Thank you. :)

Link to comment
Share on other sites

I suspect that this means that you don't have permission to do a chmod from a PHP script. Some web hosts don't allow this.

 

Try manually setting the protection to 444. which is what is necessary on the host I use. On my host, I can't do this with an FTP client, I have to do it with a script or the host's own "webftp" tool.

Link to comment
Share on other sites

Hi there, like most other people here I have installed 6.15 and then I get the message at the top of the page that says " Warning: I am able to write to the configuration file: /var/www/html/osc6/includes/configure.php. This is a potential security risk - please set the right user permissions on this file."

 

So I did change the CHMOD to 644 & 755 on 2 different attempt s to fix it and still the error message persists - so I then read the forums and discover the "Protection of Configuration - Version 1.0" fix and installed it as per instructions however when I go to Tools/Protection of Configuration and select it I get this error message on the page that appears

 

Access Denied

No Right Permission Access

Please contact your Webmaster to request more access or if you found any problem.

 

Hmmm problem is I am the webmaster :( and I have no idea - any suggestions??

Your help would be much appreciated. Thank you. :)

 

Update!

It is fixed! YAY! :D - I set the permissions to 444 and it works now - no errors - Thanks for your insight Steve!! :)

Edited by murray_simon
Link to comment
Share on other sites

Installed and works without problem. Nice contrib.....awhile due to some security changes on my host side ive been having to CHMOD in file manager within Cpanel which is a pain. CHMOD using FTP wasnt working anymore.

 

This works nice, good job :)

Link to comment
Share on other sites

  • 2 weeks later...

Installed and getting following message:

Warning: mysql_connect(): Too many connections in /home/www/flosto.freeownhost.com/catalog/includes/functions/database.php on line 19

Unable to connect to database server!

 

Can anyone help me with it PLEASE

Thank you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...