CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Upload error: directory not found

Print topic Send  topic

Author Message
Markie


Posts: 251
Posted: 08/01/2007, 1:47 AM

I have made a file upload feature to a page. I followed the necessary rules and on my local server (xampp under Windows) it's working great.

Now I have copied al the files to my colocated Linux server (Ubuntu) and now it's not working. I have chmod'ed the folders on the server (777).

When I surf to the page, I see this red warning at the top of the page:

"Het is niet mogelijk om het bestand {1} in veld FileUpload te kopieren naar de server - de directory is niet gevonden. "

This is in Dutch language, in English it's something like:

"It's not possible to copy the file {1} in the field FileUpload to the server - the directory has not been found"

I see this warning directly when I enter the page. I can't understand why the system mentions file {1} and why the directory can't be found. Which directory ?

by the way, safemode is off on my server, I use the new CCS 3.2

Anybody ?


_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message
ReneS

Posts: 225
Posted: 08/01/2007, 2:54 AM

Hi,

Is your directory structure locally the same as on the colacated one? Meaning the path to your temporary folder for upload (think you should "daar even mee stoeien")

Rene
View profile  Send private message
Markie


Posts: 251
Posted: 08/01/2007, 2:59 AM

I suppose the directory structure isn't the same on both machines, as the development machine is XP and the server is Ubuntu (Linux). How can I change the path to the temp folder (in CCS it's %TMP)

thanx

Mark
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message
ReneS

Posts: 225
Posted: 08/01/2007, 3:07 AM

Hi,

Search in CCS help for "upload" then look at "File Upload Component Reference" there are explanations of the temp folder etc.

Good luck,

Rene
View profile  Send private message
ReneS

Posts: 225
Posted: 08/01/2007, 3:09 AM

Also search for "relative path" and absolute path
View profile  Send private message
Markie


Posts: 251
Posted: 08/02/2007, 6:40 AM

Great, the red warning sign at the top of the page is gone now! I can also add new records to the dbase. BUT, I still have one problem. When I upload a file (photo), the record is add to the dbase (I can see the name of the photo in the dbase table). But, the photo is NOT add to the upload folder and, therefore, is not shown on the webpage. What can I do to solve this last problem.

This is my source code (the name of my page is fotopagina.php):

<?php
//Include Common Files @1-3ED904FC
define("RelativePath", ".");
define("PathToCurrentPage", "/");
define("FileName", "fotopagina.php");
include(RelativePath . "/Common.php");
include(RelativePath . "/Template.php");
include(RelativePath . "/Sorter.php");
include(RelativePath . "/Navigator.php");
//End Include Common Files

class clsRecordmembers { //members Class @2-7B5067C7

//Variables @2-D6FF3E86

// Public variables
var $ComponentType = "Record";
var $ComponentName;
var $Parent;
var $HTMLFormAction;
var $PressedButton;
var $Errors;
var $ErrorBlock;
var $FormSubmitted;
var $FormEnctype;
var $Visible;
var $IsEmpty;

var $CCSEvents = "";
var $CCSEventResult;

var $RelativePath = "/var/www/html";

var $InsertAllowed = false;
var $UpdateAllowed = false;
var $DeleteAllowed = false;
var $ReadAllowed = false;
var $EditMode = false;
var $ds;
var $DataSource;
var $ValidatingControls;
var $Controls;
var $Attributes;

// Class variables
//End Variables

//Class_Initialize Event @2-2247068F
function clsRecordmembers($RelativePath, & $Parent)
{

global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->Visible = true;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Record members/Error";
$this->DataSource = new clsmembersDataSource($this);
$this->ds = & $this->DataSource;
$this->InsertAllowed = true;
$this->UpdateAllowed = true;
$this->DeleteAllowed = true;
$this->ReadAllowed = true;
if($this->Visible)
{
$this->ComponentName = "members";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$CCSForm = split(":", CCGetFromGet("ccsForm", ""), 2);
if(sizeof($CCSForm) == 1)
$CCSForm[1] = "";
list($FormName, $FormMethod) = $CCSForm;
$this->EditMode = ($FormMethod == "Edit");
$this->FormEnctype = "multipart/form-data";
$this->FormSubmitted = ($FormName == $this->ComponentName);
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->user_login = & new clsControl(ccsTextBox, "user_login", "User Login", ccsText, "", CCGetRequestParam("user_login", $Method, NULL), $this);
$this->user_login->Required = true;
$this->real_name = & new clsControl(ccsTextBox, "real_name", "Real Name", ccsText, "", CCGetRequestParam("real_name", $Method, NULL), $this);
$this->FileUpload = & new clsFileUpload("FileUpload", "FileUpload", "/var/tmp/", "/var/www/html/upload", "*", "", 100000, $this);
$this->Button_Insert = & new clsButton("Button_Insert", $Method, $this);
$this->Button_Update = & new clsButton("Button_Update", $Method, $this);
$this->Button_Delete = & new clsButton("Button_Delete", $Method, $this);
}
}
//End Class_Initialize Event

etc. etc.


_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message
Markie


Posts: 251
Posted: 08/02/2007, 7:51 AM

solution found: i forgot the slash at the end of the path (/var/www/html/upload had to be /var/www/html/upload/)
now it's workin'

Thanks again !
_________________
The Netherlands, GMT+1
Tools: CCS 5.1, Windows 7, Navicat, Ultraedit
Local server: XAMPP with Apache, php and MySQL
Webserver: Windows 2008 IIS 7, php and MySQL
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.