Zend PHP uploaded file resolution in Windows 7

I have a Zend Server CE server running on Windows 7. By default, Apache works as a service, log in as a local system account.

My download The action saves the downloaded file to its destination OK, but the file permission is set only on SYSTEM, Administrators and IIS_IUSERS.

After loading, I cannot open it or move it using PHP. I use the following code to get the file in the Zend Framework in POST:

$upload = new Zend_File_Transfer_Adapter_Http(); $upload->setDestination($_SERVER['DOCUMENT_ROOT']. "/".$upFolder); if (!$upload->isValid()) { $messages = $upload->getMessages(); throw new Exception( implode("\n", $messages)); }else{ try { $upload->receive(); } catch (Zend_File_Transfer_Exception $e) { throw new Exception('Bad file: '.$e->getMessage()); } 

How to set permissions so that I can use the downloaded file in php / zend

+4
source share
1 answer

Despite some suggestions, including UAC is not the answer. This problem is usually caused by installing Zend Server, and not UAC as such. Check the parent directory rights (ownership, read / write permissions, etc.), since permissions are often set to inherit by any child files / folders.

If you cannot solve this dilemma with the permission settings:

Have you tried a new installation of Zend Server? First, would I try to install Zend Server without starting "as an administrator"? (I never started Zend Server as an administrator during installation and had no problems so far.)

0
source

Source: https://habr.com/ru/post/1313685/


All Articles