• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

How to enable register_globals

J

jbsarma

Guest
I am trying to install oscommerce in a subdomain in my FC PLESK server. I get however
FATAL ERROR: register_globals is disabled in php.ini, please enable it!
I then changed register_globals off to on in the php.ini file in the usr/local/psa/admin/conf directory. Then I rebooted the server. But I keep on getting the same error. What I am doing wrong.
 
I just had to do this same thing.

To Turn on Register Globals on Your Linux Virtual Dedicated Server

1. Using SSH, connect to your server.
2. Once you are logged in, type su.
3. For your password, type the same password you used to connect to your server.
4. At the command prompt type:
vi /etc/php.ini
5. Go to the register_globals = Off and press the "i" key.
6. Change the line to register_globals = On and press the "Esc" key.
7. Type :wq! to save your file.

Once you have edited the file, you need to restart your Web server. You can restart your Web server using Plesk by selecting stop/start under the Server, Service Management section.

BTW are you using a password protect for your admin side? I can't get mine to work. Maybe you have some ideas.
 
Are you editing the correct PHP.ini file? do a phpinfo(); to find out the exact location (it will be in the first section).

Also, you do not need to reboot the server when you edit it. Just do a "service httpd restart"
 
Thanks everybody. It worked. The php.ini file is in the etc directory as you indicated. Very confusing as there are so many redundant files.

As to the protecting the oscommerce admin directory I have not got to that stage yet. Please let me know if you found a solution. It would be really nice to get help from one of the experienced members on how to protect a directory easily. I can not see any tool in the PLESK admin panel.
 
Plesk has a tool for this.

In your control panel navigate to the domain's panel. Click on the icon "Directories" Click on "Add New Directory" - then for "Directory name" enter /catalog/admin or whatever the path is to the admin directory of OSCommerce. It may be /OSCommerce/catalog/admin - omly you know for sure. Choose whether it's an SSL connection or not. Under "Header" you can enter what you want it to say in the popup box asking for username and password. Then click "OK". Now go to "Create a User" and setup your username and password.
 
Originally posted by jbsarma
Thanks everybody. It worked. The php.ini file is in the etc directory as you indicated. Very confusing as there are so many redundant files.

They are not redundant. You first tried to edit config file for PHP that serving CP interface itself.
 
As far as i know its recommended to set globals on just for the certain domain.

To do so you would have to create a vhost.conf file in the "conf" directory of the domain. Couse plesk to reconfigure the domain and to restart apache (as it has to read/reload all its httpd.include files).

I found this once in this forum but cannot find the thread any longer so i repost it here.

open the shell. create a vhost.conf file in the domains conf dir
---
echo "php_admin_flag register_globals On" > /path-to-domain/conf/vhost.conf
---
let plesk reconfigure the domain:
---
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=mydomain.tld
---
then restart the apache.
 
Very good find. I did this on Plesk 8.2 and it worked very nicely. Thanks.

David
 
I did this and it appears to only work for HTTP, but not for HTTPS. Even though they are set to the same directory.

Any Ideas?
 
Figured it out don't forget to do the same as above except change it to the following:

echo "php_admin_flag register_globals On" > /path-to-domain/conf/vhost_ssl.conf
 
Back
Top