1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

enable register_globals for a single domain.

Discussion in 'Plesk for Linux - 8.x and Older' started by prad, Apr 29, 2008.

  1. prad

    prad Guest

    0
     
    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.
     
  2. prad

    prad Guest

    0
     
    Any update on this :(
     
  3. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
  4. prad

    prad Guest

    0
     
    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.
     
  5. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    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.
     
  6. danliker

    danliker Silver Pleskian Plesk Certified Professional

    33
    43%
    Joined:
    Feb 15, 2006
    Messages:
    575
    Likes Received:
    0
    Location:
    Switzerland
    yust do a

    php_admin_flag register_globals on

    in the vhost.conf, it will work ...
     
  7. prad

    prad Guest

    0
     
    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.
     
  8. breun

    breun Golden Pleskian

    29
     
    Joined:
    Jun 28, 2005
    Messages:
    1,647
    Likes Received:
    0
    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.
     
  9. prad

    prad Guest

    0
     
    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.
     
  10. markacadey

    markacadey Guest

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