var sidebar_align = 'right';
var content_container_margin = parseInt('350px');
var sidebar_width = parseInt('330px');
php upload problem: ownership
I have a client that has made a script to upload an image, than creates a copy that is resized as a thumbnail. The problem is, when its uploaded, its owned by the apache user nobody. When the script attempts to change the image to a thumb, it can't because its owned by nobody and not the user. Any ideas how we can work around this?
Disable safe_mode, it would work.
Or, install PHP as CGI, and run it as the user.
Safe mode isn't even compiled on this server for various reasons related to the current release ( tho things look to be changng in v. 4.3.0 ). Any other suggestions?
Is it possible to have php as a module & as a cgi on the same server?
Yes its possible. When you recompile it, leave off the --with-apxs=PATH when you run ./configure
AC Host Canada
Web Hosting Solutions
Shared Hosting | Email Hosting | DNS Hosting | Custom Plans Available
Website: email: www.achost.ca [email protected]
First thing i'd do is get your client to look at his code.
There are a few php functions that he should look at - try these:
This should lead them in the right direction. Worst case: drop me an email & i'll see what i can do to help.
PS. You can also look at the exec() function & do a chown via the shell.