Jump to content

Recommended Posts

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.

 

 

Link to comment
https://forums.phpfreaks.com/topic/70172-can-php-upload-outside-websever-folder/
Share on other sites

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

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.