ispCP - Board - Support
[SOLVED] open_basedir restriction error - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: System Setup & Installation (/forum-32.html)
+--- Thread: [SOLVED] open_basedir restriction error (/thread-6755.html)



[SOLVED] open_basedir restriction error - snetekombinerke - 05-18-2009 10:34 PM

Hi,

I have oscommerce shop with various contributions installed on my ispcp server....

Im getting an error:

Warning: tempnam() [function.tempnam]: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/virtual/si00n.org/:/usr/share/php/) in /var/www/virtual/si00n.org/filmofil/htdocs/fpdf/fpdf.php on line 904

Warning: imagepng() [function.imagepng]: Invalid filename in /var/www/virtual/si00n.org/filmofil/htdocs/fpdf/fpdf.php on line 907

Warning: fopen(.png) [function.fopen]: failed to open stream: No such file or directory in /var/www/virtual/si00n.org/filmofil/htdocs/fpdf/fpdf.php on line 1566
FPDF error: Can't open image file: .png


On other server this with cpanell installed this works. How can I fix this?


RE: open_basedir restriction error - BeNe - 05-18-2009 10:47 PM

Add the "/tmp" to the open_basedir in you PHP.ini for the domain.
No the best way but it should work.

Greez BeNe


RE: open_basedir restriction error - snetekombinerke - 05-18-2009 10:53 PM

now there is

open_basedir = "/var/www/virtual/si00n.org/:/usr/share/php/"

how should edit it?


RE: open_basedir restriction error - kilburn - 05-18-2009 11:09 PM

Code:
open_basedir = "/var/www/virtual/si00n.org/:/usr/share/php/:/tmp/"
By the way, the "tempnam" function accepts a temporary directory as a parameter, and if you put "/var/www/virtual/si00n.org/phptmp" there it should work correctly. OsCommerce refusing the definition of a temporary directory to work with should be considered a bug and reported to them as such Wink


RE: open_basedir restriction error - snetekombinerke - 05-18-2009 11:27 PM

it did work

I don't know if this is a oscommerce bug or contribution bug... but I'm just that now it works Smile

thanx for the help and very quick responce Smile


RE: [SOLVED] open_basedir restriction error - pgentoo - 05-19-2009 08:28 AM

I bet this can be resolved by adding a new environment variable into your php5-fcgi-starter script. Smile I had this type of problem with Magento Commerce and it worked.

See this bug: http://www.isp-control.net/ispcp/ticket/1579

I would suggest this fix, instead of just allowing any php site to read/write to /tmp... Smile

-
pgentoo