Hi, could someone help me figure out a solution to this probelm.
I'm using zClassifieds, and am having trouble with the img file upload part.
The 2 lines of code which generate the error are:
copy( $newphoto[ $i ], "{$IMAGE_DIR}/{$photoid}.jpg" );
makeThumb( $newphoto[ $i ], "{$IMAGE_DIR}/thumb/{$photoid}.jpg" );
makeThumb is an img resizer script in the common.php library.
The errors I get are:
Warning: copy(
http://b3groove.org/ads/images/6.jpg): failed to open stream: HTTP wrapper does not support writeable connections. in /home/b3groove/public_html/ads/list.php on line 51
Warning: imagejpeg(): Unable to open 'http://b3groove.org/ads/images/thumb/6.jpg' for writing in /home/b3groove/public_html/ads/common.php on line 205
I found some info on this on another site, and it says that this is because the PHP.INI setting safe_mode is off. I am unable to change this setting using httpd.conf because my host does not allow it.
I found an image upload script which works on my site with safe_mode off, but I do not know how to modify the existing script to use the method of this new script. Here is the code of this new script:
$res = copy($HTTP_POST_FILES['userfile']['tmp_name'], $path . $HTTP_POST_FILES['userfile']['name']);
if (!$res) { echo "upload failed!<br>\n"; exit; } else { echo "upload sucessful<br>\n"; }
Can anyone help out?