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?
achost_ca
08-08-2002, 01:12 AM
Yes its possible. When you recompile it, leave off the --with-apxs=PATH when you run ./configure
battman21
08-09-2002, 05:43 AM
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:
http://www.php.net/manual/en/function.fileperms.php
http://www.php.net/manual/en/function.move-uploaded-file.php
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.