Topic: easy php upload on windows server? (Read 836 times)
Bill Cosby is my Father
Posts: 4
28 credits Members referred : 0
Pioneer Websites - Cutting Edge SimpliCity
« on: Oct 23, 2007, 05:07:55 PM »
Your excellent script is running on a few apache hosted clients of mine, but now I am forced to use it on a windows server. Should this be a problem?
Unedited, the script throws some chmod errors. I can comment them out, but check_dir doesn't seem to see directories already existing, and yet can't create them either.
All the permissions are set to fully open in the working directory (ie. root/edit/), but not in the root directory as this is unavailable - but this should not be a problem either should it?
Bill Cosby is my Father
Posts: 4
28 credits Members referred : 0
Pioneer Websites - Cutting Edge SimpliCity
« Reply #2 on: Oct 23, 2007, 05:14:43 PM »
Thank you.
The problem windows server is IIS.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6349
38918 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: Oct 23, 2007, 05:18:58 PM »
then you need to change the path structure because the DOCUMENT_ROOT var does not exists
and of course you need to remove functions like chmod, never used IIS and this class (but I remember that I switched to apache because of this problems)
Anyway if you need to use php on windows for a production server you need a solution with IIS (apache + php + windows) is not a good solution for a production server
Bill Cosby is my Father
Posts: 4
28 credits Members referred : 0
Pioneer Websites - Cutting Edge SimpliCity
« Reply #6 on: Oct 24, 2007, 02:12:34 AM »
Well it's working... with the following adjustments:
1. script can't create directories, I had to remove the check_dir function 2. temp and uploaded foto directory need to be different and be a child of the dir with full permissions where the script runs 3. I couldn't use imagemagick 4. I had to get the absolute path using: $localpath=getenv("SCRIPT_NAME"); $absolutepath=realpath($localPath);
Now to try for multiple file uploads!
« Last Edit: Oct 24, 2007, 03:04:48 AM by pioneer-websites »
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6349
38918 credits Members referred : 374
It's time to use PHP5!
« Reply #7 on: Oct 24, 2007, 09:36:45 AM »
try the following: 1. use windows command line commands (using exec()?) 2. ok 3. there is a windows version, works fine on my winXP laptop 4. thats what I meant
Olaf maybe you can try a universal way like this :
$root = dirname( __FILE__ );
As far as I know this would work on any server.
yeah right, I thought about that and maybe I need to configure all classes using the same config file (but for now I need to find 2 points I lost from my PR )