9, July 2008

easy php upload on windows server? - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Easy PHP Upload (Moderator: Olaf)
Topic: easy php upload on windows server?
« previous next »
Pages: [1] Print

Author Topic: easy php upload on windows server?  (Read 679 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?

Thanks,
Paul.

http://www.cirrusaircraftnsw.com.au Visit through proxy
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Oct 23, 2007, 05:12:42 PM »

Paul welcome at webdigity,

are you using apache or IIS?


Last blog : 4th of July Lottery from TemplateMonster.com
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: Male
Posts: 6274
38470 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 Smiley

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


Last blog : 4th of July Lottery from TemplateMonster.com
Bill Cosby is my Father
*
Posts: 4
28 credits
Members referred : 0


Pioneer Websites - Cutting Edge SimpliCity


« Reply #4 on: Oct 23, 2007, 05:25:35 PM »

thanks Olaf - yea I got round the document_root problem with a script snippet suggestion from here:
http://helicron.net/php/ Visit through proxy

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: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Oct 23, 2007, 10:32:41 PM »

try the "magic vars" from PHP to locate the "root" directory


Last blog : 4th of July Lottery from TemplateMonster.com
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: Male
Posts: 6274
38470 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 Smiley
3. there is a windows version, works fine on my winXP laptop
4. thats what I meant


Last blog : 4th of July Lottery from TemplateMonster.com
I am a metal monkey!
Administrator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 7946
40629 credits
Members referred : 3



« Reply #8 on: Oct 25, 2007, 01:13:29 PM »

Olaf maybe you can try a universal way like this :

$root dirname__FILE__ );

As far as I know this would work on any server.

Trial and Error my two best teachers Cool
Join us @ facebook Visit through proxy

Last blog : MIA - Where Nick and Tim
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6274
38470 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Oct 25, 2007, 01:16:31 PM »

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 Cheesy)


Last blog : 4th of July Lottery from TemplateMonster.com
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=7277
Tags : windows server easy php upload Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Easy PHP Upload (Moderator: Olaf)
Topic: easy php upload on windows server?
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Jul 09, 2008, 03:39:09 PM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!


Forum Statistics
Total Posts: 35.594
Total Topics: 7.356
Total Members: 3.662
Tutorials : 56
Resources : 143
Designs : 220
Latest Member: seo_mike

21 Guests, 3 Users online :

18 users online today:



Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.