28, May 2012

easy php upload on windows server? - webmaster forum

 
Webdigity webmaster forums
[ 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
Instabuck - The easy way to sell digital products online

Author 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?

Thanks,
Paul.

http://www.cirrusaircraftnsw.com.au
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
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: Male
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 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

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: Male
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: Male
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 Smiley
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: Male
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 :

$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 or twitter

Last blog : Butterfly Marketing 2.0
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Oct 25, 2007, 12: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)

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....

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?
May 28, 2012, 01:18:58 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!






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