Page 1 of 1
Image won't upload?
Posted: Sat Mar 01, 2008 7:13 pm
by ashebrian
hh
Re: Image won't upload?
Posted: Sat Mar 01, 2008 8:07 pm
by Sekka
Ok, your second implementation is the correct one.
Code: Select all
$catImage = uploadImage('fleImage', SRV_ROOT . 'images/category/');
The reason you get a permission error is probably because you can't write to the target folder.
Change the CHMOD value on the target folder, 'category' to 777. This
should solve your problem.
Re: Image won't upload?
Posted: Sat Mar 01, 2008 8:28 pm
by ashebrian
Whats CHMOD? never heard of it. I'm NOT hosting, as its hosted in austrailia with ms frontpage server. I've searched for CHMOD. If i'm not hosting the server how do i change 777? Use the following code?
Code: Select all
<?php
$ftp_server='server';
$conn_id = ftp_connect("$ftp_server");
ftp_login($conn_id, user, password);
ftp_mkdir($conn_id, dir/dir);
ftp_site($conn_id, 'CHMOD 777, dir/dir');
ftp_close($conn_id);
?>
It doesn't make sence for that to work as without u typing the username and password inside the code for access....how will that code know?
Re: Image won't upload?
Posted: Sat Mar 01, 2008 8:34 pm
by Sekka
Do you have FTP access to the server? If so, most FTP clients come with CHMOD'ing built in. Try
SmartFTP if you don't have a decent client.
Right click the folder, and select 'Properties / CHMOD', or something similar. You will then be able to enter 777 or 0777 in a field.
Re: Image won't upload?
Posted: Sat Mar 01, 2008 9:03 pm
by ashebrian
Cheers, that was simple. Now my only prob is that the images won't load. Its the error image thats displayed. So that means the filepath is faulty. am i correct?
Re: Image won't upload?
Posted: Sat Mar 01, 2008 9:07 pm
by ashebrian
The commands not working? Error msg with smartFtp - i already had this before u mentioned it
Code: Select all
[03:05:48] 500 'SITE CHMOD 777 category': command not understood
Re: Image won't upload?
Posted: Sat Mar 01, 2008 9:10 pm
by Sekka
Not a clue then. Gone beyond my understanding of servers. I only know my way around LAMP.