Current time: 05-03-2024, 01:55 AM Hello There, Guest! (LoginRegister)


Post Reply 
[SOLVED] open_basedir restriction error
Author Message
snetekombinerke Offline
Junior Member
*

Posts: 10
Joined: Jun 2008
Reputation: 0
Post: #1
[SOLVED] open_basedir restriction error
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?
(This post was last modified: 05-19-2009 02:51 AM by BeNe.)
05-18-2009 10:34 PM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #2
RE: open_basedir restriction error
Add the "/tmp" to the open_basedir in you PHP.ini for the domain.
No the best way but it should work.

Greez BeNe
05-18-2009 10:47 PM
Visit this user's website Find all posts by this user Quote this message in a reply
snetekombinerke Offline
Junior Member
*

Posts: 10
Joined: Jun 2008
Reputation: 0
Post: #3
RE: open_basedir restriction error
now there is

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

how should edit it?
05-18-2009 10:53 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: open_basedir restriction error
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
05-18-2009 11:09 PM
Visit this user's website Find all posts by this user Quote this message in a reply
snetekombinerke Offline
Junior Member
*

Posts: 10
Joined: Jun 2008
Reputation: 0
Post: #5
RE: open_basedir restriction error
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
05-18-2009 11:27 PM
Find all posts by this user Quote this message in a reply
pgentoo Offline
Member
*****
Dev Team

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #6
RE: [SOLVED] open_basedir restriction error
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
05-19-2009 08:28 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)