Koozali.org: home of the SME Server

How do I enable php upload in php.ini?

yehaah

How do I enable php upload in php.ini?
« on: July 07, 2006, 08:31:52 AM »
Hello

I've been told that i must enable upload in the php.ini file before I can upload to my website.

I've tried to search the forum without luck.

Do I use SSH?

What do I edit, and how do I do it?
What concequenses are there to allowing upload (I expect there is a reason for it not beeing enabled).

Offline arne

  • *****
  • 1,116
  • +0/-4
How do I enable php upload in php.ini?
« Reply #1 on: July 07, 2006, 01:02:37 PM »
For the 6.0.1 and older it worked that way that the server, for security reasons, were quiped with a kind of "croot environment" that prevented upload using the php upload function.

This securoty function could not be released editing the php.ini file. It used to be more difficult than that. Personally I used to remove this security function, as I thought the php upload function is rather important.

I don't know if there has been any change in this issue for the 7.0 server.

You have tried to make an upload via php and it does not work ?

Anybody who knows more about how this problem is handeled in the 7.0 revision. (I could eventually try to find tho old receipt for the 6.0.1 server if the problem still should be the same.)
......

Offline arne

  • *****
  • 1,116
  • +0/-4
How do I enable php upload in php.ini?
« Reply #2 on: July 07, 2006, 01:13:29 PM »
Here is the link from last time ..

http://forums.contribs.org/index.php?topic=23353.0

I don't know if the problem is still the identical same, but it could be ..

The link I refered to that time is dead, but I think I copied over the required info to this forum.

Please leave a msh if things should work the same way.

Yes you will have to log on as root via ssh to do the mod (if this mod is still valid ..)
......

yehaah

How do I enable php upload in php.ini?
« Reply #3 on: July 07, 2006, 01:17:21 PM »
I have got a few web sites that run on my server, and a few on a hosted webserver.

All run with the same code, but where there are no problems with the hosted sites, the ones on my SME 7.0 wil not upload images to the site.

Everything else works fine, exept the image upload funktion.

I posted the problem on another site, and an other user said that he had the same problem, and after allowing php upload in his php.ini it worked fine. He used an other linux distro, so I dont know if there are other things that doesn't allow upload as well?

Any help would be muched apreciated.

Offline arne

  • *****
  • 1,116
  • +0/-4
How do I enable php upload in php.ini?
« Reply #4 on: July 07, 2006, 01:17:40 PM »
From the old e-smith faq:

qoute>

PHP applications running in i-bays can only access files within the same i-bay. Is there a way that the administrator can relax this restriction?
Yes. The administrator can change the PHP Base Directory by executing the following commands (as root):


/sbin/e-smith/db accounts setprop your_i-bay_name PHPBaseDir /
/sbin/e-smith/signal-event ibay-modify your_i-bay_name

Note that the PHPBaseDir argument can be more restrictive than the example shown above. For example PHPBaseDir can also be '/home/e-smith/files/'.

<unquote>


... and because the uploads first go to the folder /tmp that is outside the e-bay, it will not work until the mod is performed. (If it is still working like this for the 7.0, don't know, but I guess so.)
......

yehaah

How do I enable php upload in php.ini?
« Reply #5 on: July 07, 2006, 01:26:48 PM »
In my case the image upload goes to a subfolder in the i-bay

f.eks.: www.domain.tld/imagefiles or in the ibay: ibay_name\html\imagefiles

So there is no reason to lower the security, and alow ibays to access other areas than them selves?

Or have I misunderstood the remake you discribe?

Offline arne

  • *****
  • 1,116
  • +0/-4
How do I enable php upload in php.ini?
« Reply #6 on: July 07, 2006, 01:46:39 PM »
For the older e-smit's sme servers it worked like this for the Primary i-bay and subfolders, but not the other i-bays. You are not using a subfolder to the Primary i-bay ?

It the sme 7.0 eventually should not have the old restriction, I think it would be a good thing.
......

Offline arne

  • *****
  • 1,116
  • +0/-4
How do I enable php upload in php.ini?
« Reply #7 on: July 07, 2006, 02:12:57 PM »
"In my case the image upload goes to a subfolder in the i-bay"

The probelem used to be that the upload by default first went to the /tmp folder. Then it should normally be copied over to the i-bay subfolder. The security function prevented datas to be moved from tha /tmp folder to the i-bay subfolder. (Exept for to subfolder of the Primary i-bay.)

php is not doing the upload directely to a i-bay. It moved data via a folder outside the i-bay. At last it used to work like that.

Please leave a msg if you got it working ..
......

yehaah

How do I enable php upload in php.ini?
« Reply #8 on: July 12, 2006, 04:09:09 PM »
Quote from: "arne"


Please leave a msg if you got it working ..


Unfortunately I didn't get anything to work (no idea of what to change).

I use Simple PHP blog for most of my sites, becouse it's brilliant, Open Source, and doesnt need a database (pure textfile based).
http://www.simplephpblog.com

But I still can't get it's image upload function to work on my SME server, witch is a problem, unless I have a FTP klient on the actual PC I'm using.

Any ideas of how to make a workaround?

Offline Agent86

  • *****
  • 592
  • +0/-0
    • http://www.iclbiz.com
Same here
« Reply #9 on: August 25, 2006, 12:52:33 PM »
Just about all php scripts I've tried have some type of issue with this, or at least I think this is the problem.

I need a solution for this, I want to install scripts without complications.

Anyone got a fix please post.