views:

21

answers:

3

I am getting following error while uploading image on server- Warning: copy() [function.copy]: URL file-access is disabled in the server configuration in D:\Hosting\6448289\html\upload.php on line 112

corresponding 122 line is-

$copied = copy($_FILES['image']['tmp_name'], $newname);
A: 

Is it your own server or a shared one? Seems your hosting does not allow remote connections and it is done for some good reason. Contact your host about this.

Also this link might be of some help to you.

Shoban
A: 

see
allow_url_fopen
and PHP Manual: How to change configuration settings

allow_url_fopen is marked as PHP_INI_SYSTEM in php5, so you can only change its value in the php.ini or in a httpd.conf-related config file but not via ini_set().

VolkerK
A: 

If you have the ability to have .htaccess files in your hosting directory, you could try adding either of the following to enable allow_url_fopen:

php_flag allow_url_fopen 1
php_flag allow_url_fopen on

The latter is more likely to work

webfac