Jump to content

Disabled for security reasons


Aviationguy
 Share

Recommended Posts

Last night I was trying to make a change to main.php.  I made a copy and did my change and FTP it over.

several times and eventually I would get no page to load at all.  I put back the original main.php and

still no page will load.  I found an error log at the root and this was in it over and over:

26-Oct-2015 11:33:20 UTC] PHP Warning:  ini_get_all() has been disabled for security reasons in /home/bestavia/public_html/classes/session.class.php on line 69
[26-Oct-2015 11:33:20 UTC] PHP Fatal error:  No valid language found! in /home/bestavia/public_html/classes/language.class.php on line 100

What do I do to fix this?

What did I do to cause it?

Link to comment
Share on other sites

The server administrator has decided to list ini_get_all() as a function not to be executed. In admin, PHP Info, there will be a list of all disabled functions. You may want to have a talk with your hosting provider to get that function unlisted. If that's a problem, maybe we can code a work around.

CC608 was supposed to have a fix in that, if the database says French is installed, but in fact it is not (as from a new installation connecting to an existing database), then CubeCart was supposed to fall back to British - the language that does ship with an installation package.

So, go to the Extensions Marketplace and download and install all the language packs that you recall the database knowing about.

I think the best place to look for what the database knows about is in the Cubecart_email_content table.

Link to comment
Share on other sites

I did the basic install and don't remember doing anything special installation wise about language.  Everything was working fine

until this lockout. My hosting provider did unlock ini_get_all() but as you can see in the screenshots, I don't have any words

to navigate by.  I hope I don't have to reinstall but I really am lost..

Link to comment
Share on other sites

Please look in the folder /language/. There should be at least a /flags/ folder, definitions.xml (about 212KB), email_definitions.xml, en-GB.xml, and email_en-GB.xml.

Again, using phpMyAdmin from your hosting account's control panel, look in the database table Cubecart_email_content table and discover what all the languages your database knows about.

Link to comment
Share on other sites

Good.

If I have my browser ask for this file, for example:
http:// 127.0.0.1/cc608/language/en-GB.xml

The file contents will be received and displayed.

If I ask for this file from your site, I get an Internal Server Error. I have asked for several other files (README.md, for example), and I get these other files. So, I know your web server and hosted space hasn't been totally hosed.

So, now I am thinking there must be a file permissions issue with the folder and/or the files in the /language/ folder.

Please consult with your hosting provider to determine if the /languages/ folder has had the file permissions changed to something not appropriate.

Link to comment
Share on other sites

I am on Hostgator (hold your laughter please...) and I have had my file permission change themselves when I FTP files up to the server. This then locks that file so it can't be executed by Cubecart. This same thing happened to me once but with another file. I had to delete the file completely and then upload it again to reset the file permissions.

Link to comment
Share on other sites

If what you said earlier, that "my file permission change themselves when I FTP files up to the server," I'm going to have to assume nothing will change.

If you are using an FTP program you have installed on your computer, that may be the cause of the issue.

If your hosting control panel has its own FTP tool, maybe by using that, instead of what you have installed, will get the files on the server with the proper permissions.

Link to comment
Share on other sites

If what you said earlier, that "my file permission change themselves when I FTP files up to the server," I'm going to have to assume nothing will change.

If you are using an FTP program you have installed on your computer, that may be the cause of the issue.

If your hosting control panel has its own FTP tool, maybe by using that, instead of what you have installed, will get the files on the server with the proper permissions.

My hosting provider said that the language folder was missing and they restored it.  I think it was messed up and not missing because you had me look in it for those files and I did. Anyway, it's working fine now and I thank you very much for the help.

Link to comment
Share on other sites

Following up, you said:

The server administrator has decided to list ini_get_all() as a function
not to be executed. In admin, PHP Info, there will be a list of all disabled
functions. You may want to have a talk with your hosting provider to get that
function unlisted.

I can't find that.  I looked in admin.  Can you be more specific on how

to get to it?  thanks.

Link to comment
Share on other sites

In admin, click PHP Info at the bottom of the navigation panel. On the page that is displayed, you will see a series of purple and grey tables.

Scroll to the Core table and find the disable_functions row.

If the host is still disabling that function (and a bunch of others), it should be listed here.

Link to comment
Share on other sites

Thanks, I found it and that page has no files on it at all.  Is that normal?  Also, 1 more thing.  I found

an error log and this entry was in it today:

 

[Thu Oct 29 02:10:17 2015] [error] [client 180.76.15.155] File does not exist: /home/bestavia/public_html/

robots.txt
 
Is that a Cubecart thing?  I don't have that file in my backup.

 

Link to comment
Share on other sites

The disable_functions row of the Core table should have something listed, unless that configuration is handled by some sort of add-on security application. If so, I have no experience with what that add-on security application may be.

But I have seen sites with certain functions that allow PHP to execute code outside of its environment commonly be disabled.

Web indexers (Google) that are well-behaved will first request a robots.txt file. This file has directives that inform the indexer what folders, pages, and page resources may be collected. You can read more about it at http://www.robotstxt.org/robotstxt.html

The robots.txt file is not a CubeCart thing.

Link to comment
Share on other sites

Thanks, I found it and that page has no files on it at all.  Is that normal?  Also, 1 more thing.  I found

an error log and this entry was in it today:

 

[Thu Oct 29 02:10:17 2015] [error] [client 180.76.15.155] File does not exist: /home/bestavia/public_html/

robots.txt
 
Is that a Cubecart thing?  I don't have that file in my backup.

 

I'm not on HG any more, but my host has checked my robots.txt file and says it's just fine. But Google suddenly stopped "finding" my robots.txt just last week. I even tried changing to a barebones file and Google still said it was unreachable.

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
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.

 Share

×
×
  • Create New...