kalhusoru Posted September 21, 2007 Share Posted September 21, 2007 I've built a photo database on the intranet with PHP and MsAccess database. I've completed the application with http upload. All works fine untill i found out that upload works only in webserver folder. Which means the files cannot be uploaded into another drive on my web hosting computer. The problem is the hard-disk size of my webserver partition will not be enough for the photos in the future. Anyone have a solution to this? I want a php script that can upload files to differen partitions of my hard-disk and possibly into diffrent network storage folders. Please please please Help. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/70172-can-php-upload-outside-websever-folder/ Share on other sites More sharing options...
SharkBait Posted September 21, 2007 Share Posted September 21, 2007 Well as long as Apache (i am assuming you're running Apache as your web server) has the proper permissions to write outside of its root serving directory it should be able to write where ever you want it to. Though I've never done it before but I would think that is the logic behind it Quote Link to comment https://forums.phpfreaks.com/topic/70172-can-php-upload-outside-websever-folder/#findComment-352483 Share on other sites More sharing options...
kalhusoru Posted September 22, 2007 Author Share Posted September 22, 2007 Yes i am running Apache server not IIS but on Windows system. What permissions do i have to set in Apache and how. The following is the things u can set in php.ini file. ; Whether to allow HTTP file uploads. file_uploads = On ; Temporary directory for HTTP uploaded files (will use system default if not ; specified). ;upload_tmp_dir = ; Maximum allowed size for uploaded files. upload_max_filesize = 2M Do i need to change somthing in apache conf folder? I really have no clue and I'm surprise that almost none had come across this issue before. Quote Link to comment https://forums.phpfreaks.com/topic/70172-can-php-upload-outside-websever-folder/#findComment-352748 Share on other sites More sharing options...
kalhusoru Posted September 23, 2007 Author Share Posted September 23, 2007 All PHP freaks, No-body have clue on this? Quote Link to comment https://forums.phpfreaks.com/topic/70172-can-php-upload-outside-websever-folder/#findComment-353213 Share on other sites More sharing options...
cooldude832 Posted September 23, 2007 Share Posted September 23, 2007 part of the reason is because you posted it in the php help not the apache help, but any way file uploads work by first going to a temp folder then they are deleted after they die (like sessions), unless you do somethign about it, however I don't see how you can have an unallocated hard drive space in apache and expect another location to be valid. If its in the apache folder then it has to be on the same hard drive to work right, so the simply solution is to reload apache on a bigger HD, because you can't just magically make it upload to another drive, unless that secondary drive is cleared as another server in your server and you tandem them together, which is out of my jurisdiction. Quote Link to comment https://forums.phpfreaks.com/topic/70172-can-php-upload-outside-websever-folder/#findComment-353216 Share on other sites More sharing options...
kalhusoru Posted September 23, 2007 Author Share Posted September 23, 2007 I think what i'm looking for is internet storage, Shared Folders Quote Link to comment https://forums.phpfreaks.com/topic/70172-can-php-upload-outside-websever-folder/#findComment-353261 Share on other sites More sharing options...
marcus Posted September 23, 2007 Share Posted September 23, 2007 You could remotely connect to their FTP server and upload via that Quote Link to comment https://forums.phpfreaks.com/topic/70172-can-php-upload-outside-websever-folder/#findComment-353264 Share on other sites More sharing options...
d22552000 Posted September 23, 2007 Share Posted September 23, 2007 uh either use TP ommand s if its on another computer... BUT IF ITS ON THE SAME COMPUTER: be cheap and do: system('copy '.$pathtopicture.' '.$pathtodrive); system('erase '.$pathtopicture.' /f /s /q'); Quote Link to comment https://forums.phpfreaks.com/topic/70172-can-php-upload-outside-websever-folder/#findComment-353293 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.