daniloaz / myphp-backup

Simple and fast MySQL backups using PHP
GNU General Public License v3.0
201 stars 115 forks source link

HTTP wrapper does not support writeable connections #12

Closed wings77 closed 5 years ago

wings77 commented 5 years ago

Hello Daniel,

this error

Warning: file_put_contents(http://wampserver/htdocs/erp/backups/1-backup-softnet_alladin_demo-20190519_120856.sql): failed to open stream: HTTP wrapper does not support writeable connections in D:\wampserver\htdocs\erp\demo\core\class_database\myphp-backup.php on line 304

on line...

file_put_contents($this->backupDir.'/'.$this->backupFile, $sql, FILE_APPEND | LOCK_EX);

daniloaz commented 5 years ago

You can not write directly to an HTTP endpoint (you should use a WebDAV for that). Backup dir and backup file must be an absolute or relative path within your storage disk, not an HTTP URL.