Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: RRX on October 17, 2002, 03:52:12 AM

Title: After upgrading to SME 5.5 Upload function doesn't work (PHP
Post by: RRX on October 17, 2002, 03:52:12 AM
I have searched for this problem here, but I couldn't find a right solution.

I have made a personal photobase for uploading photo's, it worked great on SME 5.0, but since I have upgraded to 5.5 all my PHP aplications using upload functions, doesn't work any more :(

The file are being uploaded in a folder within the current i-bay for example "./upload"

I have looked "almost the whole web" for a sollution, but I still haven't find a solution :(

can anyone please help me

RRX
Title: Re: After upgrading to SME 5.5 Upload function doesn't work
Post by: brad wright on October 17, 2002, 05:01:16 AM
I just Updated to 5.5 from 4.1.2 yeaterday. I too am now having the same problem.

The difference is, howerver, that my project involves uploading (and retreiving) files to (and from) a mySQL database.

I remember hearing that something has changed in the new version of SME that does not allow file uploads via PHP... is this true??  

If it is true... AAAAHHH!!!... and secondly.. is there a workaround??

Can anyone help us poor lost souls??
Title: Re: After upgrading to SME 5.5 Upload function doesn't work
Post by: Barry Nesbit on October 17, 2002, 08:25:36 AM
Given past security problems with PHP's file upload functions it isn't the best idea to have this option turned on unless its absolutely necessary.

To turn file upload on follow the below instructions. (Root access required.)

1. Modify php.ini (via the templates) :

  vi /etc/e-smith/templates/etc/php.ini/60FileUploads

2. Edit the first line to:

  file_uploads=on

3. Expand the php.ini template:

  /sbin/e-smith/expand-template /etc/php.ini

4. Restart httpd:

  /etc/rc.d/init.d/httpd restart

Barry
Title: Re: After upgrading to SME 5.5 Upload function doesn't work
Post by: brad wright on October 17, 2002, 08:43:15 AM
Barry,
Thanks for your prompt reply.

Did what you suggest. However:
1. File_Upload was already switched to 'on'.

2. got this msg when i tried to expand the templatte:

[root@e-smith /]#   /sbin/e-smith/expand-template /etc/php.ini
Odd number of elements in hash assignment at /usr/lib/perl5/site_perl/esmith/db.pm line 288.
Use of uninitialized value in hash assignment at /usr/lib/perl5/site_perl/esmith/db.pm line 288.
Use of uninitialized value in substitution (s///) at /usr/lib/perl5/site_perl/esmith/DB/db/Record.pm line 132.
[root@e-smith /]#

Files still do not upload.

Any ideas??
Title: Re: After upgrading to SME 5.5 Upload function doesn't work
Post by: Paul Nesbit on October 17, 2002, 07:34:34 PM
Barry Nesbit wrote:

>  [...]
> 1. Modify php.ini (via the templates) :
>
>   vi /etc/e-smith/templates/etc/php.ini/60FileUploads

Please DO NOT edit templates directly.  Instead create a custom template from the original, and edit the copy.  

  http://www.e-smith.org/custom/

E.g.

  # mkdir -p /etc/e-smith/templates-custom/etc/php.ini

  # cp /etc/e-smith/templates/etc/php.ini/60FileUploads \
        /etc/e-smith/templates-custom/etc/php.ini

  # vi /etc/e-smith/templates-custom/etc/php.ini/60FileUploads

This will ensure that your changes aren't lost on upgrade, and that you can promptly restore the system to a known, supported configuration if need be.

Cheers,
 
  Paul
Title: Re: After upgrading to SME 5.5 Upload function doesn't work
Post by: brad wright on October 18, 2002, 04:50:52 AM
Paul,
I did not actually modify any file, as the first line in file : /etc/e-smith/templates/etc/php.ini/60FileUploads

was , in fact already set as:

file_uploads=on


BUT my file uploads ARE NOT working.

Once again, I am uploading files directky to the DB (mysql).  I get no error msg when my scroit tries to upload the file... it just does not upload.

Any ideas??

Thanks in advance.