Topic: easy php upload on windows server? (Read 5192 times)
Bill Cosby is my Father
Posts: 4
28 credits Members referred : 0
Pioneer Websites - Cutting Edge SimpliCity
« on: Oct 23, 2007, 04: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?
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #1 on: Oct 23, 2007, 04:12:42 pm »
Paul welcome at webdigity,
are you using apache or IIS?
Bill Cosby is my Father
Posts: 4
28 credits Members referred : 0
Pioneer Websites - Cutting Edge SimpliCity
« Reply #2 on: Oct 23, 2007, 04:14:43 pm »
Thank you.
The problem windows server is IIS.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #3 on: Oct 23, 2007, 04: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 #4 on: Oct 23, 2007, 04:25:35 pm »
thanks Olaf - yea I got round the document_root problem with a script snippet suggestion from here: http://helicron.net/php/
but then it kept saying file exists - its as though the script isn't able to accurately list files/dirs.
anyhow, thanks for the prompt support.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #5 on: Oct 23, 2007, 09:32:41 pm »
try the "magic vars" from PHP to locate the "root" directory
Bill Cosby is my Father
Posts: 4
28 credits Members referred : 0
Pioneer Websites - Cutting Edge SimpliCity
« Reply #6 on: Oct 24, 2007, 01: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, 02:04:48 am by pioneer-websites »
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6691
34714 credits Members referred : 374
It's time to use PHP5!
« Reply #7 on: Oct 24, 2007, 08: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
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5799
46391 credits Members referred : 3
« Reply #8 on: Oct 25, 2007, 12:13:29 pm »
Olaf maybe you can try a universal way like this :
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 )
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7277