Atari ST fan
Posts: 8
64 credits Members referred : 0
« on: Apr 26, 2007, 01:37:39 PM »
This is maybe off-topic since this question is about the upload_class,-but here we go: I have been trying many different php upload scripts, but I have only managed to make one such script work. I have decided to try the upload class you wrote, but it will not upload any images. There are no error messages, but still it doesn't work. The only php script that works half way, is the <upload_db_example.php> It creates the database table but failes to write the filename. Also, it does not upload the file to the server. My question is this: -What are the possible factors that makes the upload_class not work?
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 8266
42583 credits Members referred : 3
« Reply #1 on: Apr 26, 2007, 01:48:09 PM »
Maybe permissions? If no class is working then you should probably don't have permissions to write where you try to.
When you fopen() a file that doesn't exists, php creates it or nothing happens?
Atari ST fan
Posts: 8
64 credits Members referred : 0
« Reply #2 on: Apr 26, 2007, 02:06:27 PM »
First of all: Thank you for all the quick replies on this forum. Give me a little time, and I'll give you more info and more questions later today.
Atari ST fan
Posts: 8
64 credits Members referred : 0
« Reply #3 on: Apr 26, 2007, 03:27:09 PM »
This is the directory-structure and the path to the file <upload_class.php>: http://mysite.com/httpdocs/community/upload_class/upload_class.php
This is the first line of the php scripts in the upload_class: include ($_SERVER['DOCUMENT_ROOT']."/community/upload_class/upload_class.php");
My mistake was creating the directories: <files/new> in the <community>-directory. Then I created the following directories: <files/new> in the <httpdocs>-directory, chmod 777, (-one level up from the <community>-directory, and that made the upload_class work. Now the upload_class uploads images to the <files/new>-directory, and it also updates the database.
Moderator Community Supporter?
Jedai Sword Master
Gender:
Posts: 6479
39706 credits Members referred : 374
This is the directory-structure and the path to the file <upload_class.php>: http://mysite.com/httpdocs/community/upload_class/upload_class.php
This is the first line of the php scripts in the upload_class: include ($_SERVER['DOCUMENT_ROOT']."/community/upload_class/upload_class.php");
My mistake was creating the directories: <files/new> in the <community>-directory. Then I created the following directories: <files/new> in the <httpdocs>-directory, chmod 777, (-one level up from the <community>-directory, and that made the upload_class work. Now the upload_class uploads images to the <files/new>-directory, and it also updates the database.