• 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!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    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. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

enable register_globals for a single domain.

P

prad

Guest
Hello,

I am using plesk v 8.3 on a debian server. The php-suexec is enabled on the server and register_globals is disabled server wide.

How do I enable it for a single domain ? I tried to put custom php.ini file in the documentroot of that domain, but that is not helping ... :( Enabling it in .htaccess is giving error, as the server is php suexec'ed.

Is there any way to achieve it ? Any suggestion is greatly appreciated.

Thanks,
Prasad.
 
Thank you for your update :)

But I think that is not the solution that I am looking for. The php on the server CGI, so any directive that we use in http or in htaccess results in error "incorrect or unknown configuration directive".

So we used to put a php.ini file in the home directory in our Cpanel servers and it used to work just great, but here it is not working ... :(

Thanks,
Prasad.
 
Plesk runs PHP as mod_php by default. You should be able to create a vhost.conf file in the domain's conf directory and put in something like this:

Code:
<Directory /var/www/vhosts/example.com/httpdocs>
php_admin_flag register_globals on
</Directory>

Then run websrvmng as instructed at the link I posted earlier and register_globals should be enabled on that domain.
 
yust do a

php_admin_flag register_globals on

in the vhost.conf, it will work ...
 
Ah ... I did the following like you mentioned.

Created a file vhost.conf in the conf directory, and added the following.

<Directory /var/www/vhosts/example.com/httpdocs>
php_admin_flag register_globals on
</Directory>

and ran the command /usr/local/psa/admin/sbin/websrvmng for that domain.

It resulted in apache failure...

---
Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration failed!
---

I removed it to make the web server up and running.

FYI, the php is running as cgi,

---
Server API CGI/FastCGI
---

Thanks,
Prasad.
 
It appears you cannot use php_admin_flag with CGI and php_flag also is not recognized in that case, nor are the keywords on and off. You could try setting php_value register_globals 1.
 
Thank you for all your help :)

Actually I found out a way to do it. I added the following lines in vhost.conf file.

<IfModule mod_suphp.c>
suPHP_ConfigPath /path/to/my/custom/php.ini/file
</IfModule>

and put a php.ini file with register_globals turned on in that folder and ran the command websrvmng for that domain.

It is working now.

Thanks,
Prasad.
 
I have a website that is ready for launch. We have a problem creating
subdomains on the site.
The script we're using is working on other servers, but on a specific one that
we want, the server doesn't let us write that forlder.

I heard that this is a common problem with the plesk we're using.
The server doesn't let us access the conf forlder, and gives us this error:

Unable to change directory to /conf/: ls_dir_wrapper() failed: filemng: opendir
failed: Permission denied

If you know what I'm talking about, please bid.
Thanks.
 
Back
Top