Current Interests

Right now I am working with two great PHP frameworks for two different application: Zend Framework and Orchid. Although I'm a huge fan of CodeIgniter, I'm finding ZF to be robust and really solid for becoming the #1 choice of enterprises very soon.

In addition to them, I am also having a good look on Dojo - as it became Zend Framework's official JavaScript toolkit. I have to agree that there a few gems in it which I like, but I'm yet to discover its full potential. In the meantime, jQuery is helping me a lot.

Latest reading

powered by LibraryThing
 
Oct
12

Turning local open_basedir off

  Trackback 
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3 out of 5)
Loading ... Loading ...

I have been trying to remove the open_basedir directive from my php configuration to allow seamless CURL operation in my server (Plesk based).

As the first step, I edited the /etc/php.ini file and set the directive to none. It made the master value for open_basedir to none. But even if, the local value is set and was causing enough trouble.

I googled it, carried out a few methods, but nothing worked. The last try got me the result I needed:

1. Created a new httpd.conf file in my domains conf folder: /var/www/vhosts/mydomain.org/conf

2. Put the following lines there:

<Directory /var/www/vhosts/mydomain.org/httpdocs>
php_admin_value open_basedir "none"
</Directory>

3. Updated Plesk configuration: # /usr/local/psa/admin/sbin/websrvmng -v -a

4. Restarted apache: apachectl restart

5. Voila!

I hope this helps somebody out there.

Share and Enjoy:
  • Digg
  • del.icio.us
  • StumbleUpon
  • description
  • Furl
  • Ma.gnolia
  • Technorati
  • Reddit
  • Simpy

Viewing 1 Comment

    • ^
    • v
    You are right but there is one problem, at least with my Plesk version there was.

    If you open httpd.include you see at the top DO NOT MODIFY THIS, USE vhosts.conf You also see this is the file setting open_basedir value.

    I tried doing your httpd.conf didn't work so when I saw the warning message in httpd.include regarding vhost.conf I tried it.

    I put your exact code in vhost.conf and did the 2 commands you said to do after, and it worked.

    Thanks,
    Larry

Trackbacks

close Reblog this comment
blog comments powered by Disqus