This topic is locked

image directory path - URGENT

6/18/2007 3:17:20 AM
PHPRunner General questions
9
990405 author

Hi I am a novice and having problems with uploading images into a directory.
I am using Xampp

The Mysql database confirms that the link has been added, but I get the following message everytine after I do an upload.
PHP error happened
Technical information

Error type 2

Error description move_uploaded_file(..Images/Sector/banana.jpg): failed to open stream: No such file or directory
Could someone advise the correct path to use.
I store all images in a Xampp directory
\Images\Sector
any suggestions

J
Jane 6/18/2007

Hi,
you need to make sure "Images\Sector" directory is writable by the web server user.

Usually you can assign correct permissions using your control panel. Also you may ask your webshoting company to help you with this.

9
990405 author 6/18/2007

Hi,

you need to make sure "Images\Sector" directory is writable by the web server user.

Usually you can assign correct permissions using your control panel. Also you may ask your webshoting company to help you with this.


I have assigned cmod 777 to this directory and also sub-directory, but did not make any difference

Alexey admin 6/18/2007

Hi,
make sure your Upload folder path is correct.

Directory "\Images\Sector" is probably wrong.

Try using "Images/Sector" - no leading slash and slashes instead of backslashes.

9
990405 author 6/18/2007

I now get the following error results
goto

http://interaustralia.com/phprunner/Form/Maintable_add.php
Error type 2
Error description move_uploaded_file(/public_html/Images/Sector/banana.jpg): failed to open stream: No such file or directory
URL interaustralia.com/phprunner/Form/Maintable_add.php?
Error file /home/interaus/public_html/phprunner/Form/Maintable_add.php
Error line 361

SQL query insert into `Maintable` (`Company`, `Name`, `Surname`, `Position`, `Post_Box`, `Address`, `Suburb`, `Post_Code`, `Comune_Town`, `Province`, `City`, `State`, `Country`, `Telephone`, `Fax`, `Email`, `Web_Site`, `Company_details`, `Business_activity`, `Industry_Sector1`, `Size`, `Turnover`, `Product_Service`, `Product_details`, `Service_details`, `Business_Cooperation`, `Offer_Request`, `Industry_Sector2`, `Image_1`, `Image_2`, `Image_3`, `Logo`, `submitted`) values ('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'banana.jpg', '')
any comments?

the image is text added 'banana.jpg' to my database

9
990405 author 6/18/2007

I have used
/home/public_html/Images/Sector
and also
/Images/Sector
and also
../Images/Sector
but always errors result

9
990405 author 6/18/2007

I have used

/home/public_html/Images/Sector
and also
/Images/Sector
and also
../Images/Sector
but always errors result


My local folder on my PC

I store all images in a Xampp directory
\Images\Sector

Alexey admin 6/18/2007

What is the full physical path of your images folder ?

9
990405 author 6/18/2007

What is the full physical path of your images folder ?


On my PC it is
C:\Program Files\xampp\htdocs\startlogic\Images\Sector
on my web server it is
/ home / public_html / Images / Sector -> (with spaces)

or

http://interaustralia.com/Images/Sector
a bit frustrating ..!

Alexey admin 6/18/2007

You wrote:

on my web server it is

/ home / public_html / Images / Sector -> (with spaces)

or


Are you sure ?

Looks like it is

/home/interaus/public_html/Images/Sector
Enter this path into Upload folder dialog or use the following:

../../Images/Sector