Loading...
 
Community and *.tiki.org site organization

Community and *.tiki.org site organization


Problem adding topic

posts: 2

Hi,

I just installed tikiwiki for testing, so this will probably be a very newbie question :-(
When I try to add a topic with an image, I get errors:
Warning: fopen(): open_basedir restriction in effect. File(/tmp/php3GVlkv) is not within the allowed path(s): (..:.:/usr/lib/php:/usr/lib/php/Smarty:/usr/share/webapps) in /path_to_my_docroot/tiki/tiki-admin_topics.php on line 30

Warning: fopen(/tmp/php3GVlkv): failed to open stream: Operation not permitted in /path_to_my_docroot/tiki/tiki-admin_topics.php on line 30
...
This is on my development server. My open_basedir:
open_basedir = "..:.:/usr/lib/php:/usr/lib/php/Smarty:/usr/share/webapps"
I don't want to include /temp, because there are the temporary files for all users (like sessions :-( ).
imo the correct way for the script would be to move the uploaded file to it's own temporary directory with move_uploaded_file() and then try to open it.
Or did I miss a simple workaround?

Thanks for tikiwiki
GeG

PS: i just noticed that the same happens when you try to uplad an image when adding an article. But it does work when adding pictures to the image gallery.

posts: 2881 United Kingdom

Hi. This forum area is called About tikiwiki.org not for support.

Please Read this page, as it contains the fixes: InstallTikiUnderSafeMode

Many Thanks

Damian


posts: 1

I have experienced the same problem. My hosting provider implement open_basedir and therefore when I try and upload images for topics I get similar errors.

The problem lies with tiki-edit_topic.php. Around line 36, before you can successfully perform the fopen() operation you first need to move the uploaded file to somewhere within your open_basedir.

Therefore you need to add a line to perform a move_uploaded_file() to move it somewhere where your web-server has write access and it is within your open_basedir permissions.

I have just tried a rough hack, hard-coding the location where I move the file to, and it works a charm

Running version 1.8.4 - just uploading the latest 1.9RC4 release to see if it's fixed in that version.


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting