Page 1 of 1

Directory and Upload files

Posted: Sat 13. Dec 2003, 14:17
by raoulx
Hello all;

When i try to upload files i have this message:

Please do not try again - this is an server error! Contact the webmaster to tell as soon as possible!

Im looking inside phpwcms_filestorage: i havent directories but in file manager I see the name of them...

a Idee?

Thank you

Posted: Sat 13. Dec 2003, 14:20
by frold
I have same prob... event though I have chmod the folders...

Answer for me ;o)

Posted: Sat 13. Dec 2003, 14:26
by raoulx
For me is the 777 chmod the phpwcms_filestorage
Its correct now...

Posted: Sat 13. Dec 2003, 14:33
by frold
well It seem like I´m not have permissions to upload file.. but the folder is chmod 777....and the same for the subfolders 1, 2 insite the storage folder?

What to do?

Solution? and Another little trouble...

Posted: Sat 13. Dec 2003, 14:57
by raoulx
Perhaps Its a good idee to erase all folders and rebegin the manipulation.

Now I have another problem, I cant see any pictures in folders root when i would like to insert one in a article.

But i have the file in folder and create thumbnail...

???

Posted: Sun 14. Dec 2003, 11:20
by Checksum
OK, I have the same problem. I didn´t analayse the source until now, but it seems that my error is path related.

You can check your setting by doing the following:

1. open include/incl_tmpl/files.private.upload.tmpl.php

2. Goto line 91 (or so) where variable $useruploadpath is defined.

3. fill in a echo command like "echo $useruploadpath"

4. Goto Backend and try to upload anything..

Check the path settings. In my local system I get "F:/www/phpwcms_filestorage/1" and a Errormessage, so waht I see is
"F:/www/phpwcms_filestorage/1Error while creating user directory."

My Installation Path is F:/www/cms/phpwcms/

Is it possible that the wrong path has something to do with the session save path ???

Posted: Sun 14. Dec 2003, 13:33
by pSouper
Hi Guys, I'm having a simmilar problem but do not know the expected output to see how close i'm getting with it.
does the line mentioned in the post above expect the full path fro mdrive letter or from the IIS 'home directory'? or would it like a reletive path from the file.private.upload.tmpl.php file?

could anyone with a WORKING phpwcms add a debug line to
file.private.upload.tmpl.php somewhare around line 91 and post the result please [edit any sensitive info of course].

Code: Select all

echo $useruploadpath."<br>";//DEBUG LINE
$file_error["upload"] = "Error while creating user directory.";}
thanks in advance pSouper

Posted: Sun 14. Dec 2003, 14:37
by DeXXus
could anyone with a WORKING phpwcms add a debug line to
file.private.upload.tmpl.php somewhare around line 91 and post the result please [edit any sensitive info of course].
Anyone with a WORKING phpwcms would not see any output, as that is in an error routine for those with problems. :wink:

The new directory is created in your path to "/phpwcms_filestorage" as subdirectory named "1" (i.e. /phpwcms_filestorage/1/) and files named such as "1_5.gif" and 1_3.jpg" are created there. The "1" is the wcs_user_id of the person logged in.

Code: Select all

$useruploadpath = PHPWCMS_ROOT.$phpwcms["file_path"].$_SESSION["wcs_user_id"];

Posted: Sun 14. Dec 2003, 15:26
by pSouper
hehe deXXus, very sneaky reply :lol: but oh so embarrasing for me :oops:

YAY: i've fixed it in rough way now - i hardcoded the root dir...

Code: Select all

			//origonal//$useruploadpath = PHPWCMS_ROOT.$phpwcms["file_path"].$_SESSION["wcs_user_id"];
			$useruploadpath = "d:\wwwroot/WWW/Tinytots_Remote/".$phpwcms["file_path"].$_SESSION["wcs_user_id"];
however this only fixes upload - I would assume i would have to alter a good few PHPWCMS_ROOT along the way to get download & thumbs etc working.
[still looking into why]

Posted: Sun 14. Dec 2003, 15:51
by DeXXus
I see you changed to "http://www.tinytots.dyndns.tv/"
You're gonna be a "patchin'" fool :lol:
My recommendation:
Same as for all the others above...
Get your paths ~right~ :wink:

I think you said in the other thread that you modded:

Code: Select all

mysql_free_result($check);
		header("Location: ".$phpwcms["site"].$phpwcms["root"]."phpwcms.php");
		exit();
to...

Code: Select all

		mysql_free_result($check);
		header("Location: "."phpwcms.php");
		exit();
This method will lead you down a path of BIG regret :?
When script updates and modifications come along, you will have big headaches and functions like:

Code: Select all

header("Location: ".$phpwcms["site"].$phpwcms["root"]."phpwcms.php");
and

Code: Select all

$useruploadpath
are used in other places in the code. The first one... in MANY. The second in ftptakeover & imagick, as well as here in private.upload!

Posted: Sun 14. Dec 2003, 16:01
by pSouper
hehe, I am trying to get the paths right :lol:
login.php now uses the default...

Code: Select all

		mysql_free_result($check);
		header("Location: ".$phpwcms["site"].$phpwcms["root"]."phpwcms.php");
		exit();
:wink:
I now have 'upload' and 'download' but no thumbs...
php.ini is loading g2 without error and conf.inc is using...

Code: Select all

$phpwcms["imagick"]           = 0; //0 = GD,  1 = ImageMagick convert
$phpwcms["imagick_path"]      = ""; //Path to ImageMagick (default="" - none)
$phpwcms["use_gd2"]           = 1; //0 = GD1, 1 = GD2
i don't have image magic installed at all - is this needed even if i want to use g2?

all this to get multiple sites on winxp iis :)
if you missed it before i use a .tv domain > dyndns/dir/dir/index.html > myIP
the additional dirs are wherin my nemesis taunts.

thanks for the advice thus far DeXXus - keeping me sane, amused and alive

Posted: Sun 14. Dec 2003, 16:54
by DeXXus
pSouper wrote:I now have 'upload' and 'download' but no thumbs...
php.ini is loading g2 without error and conf.inc is using...

Code: Select all

$phpwcms["imagick"]           = 0; //0 = GD,  1 = ImageMagick convert
$phpwcms["imagick_path"]      = ""; //Path to ImageMagick (default="" - none)
$phpwcms["use_gd2"]           = 1; //0 = GD1, 1 = GD2
i don't have image magic installed at all - is this needed even if i want to use g2?
No, your settings look fine for use of GD2. No error message(s)???
pSouper wrote:all this to get multiple sites on winxp iis :)
if you missed it before i use a .tv domain > dyndns/dir/dir/index.html > myIP
the additional dirs are wherin my nemesis taunts.

thanks for the advice thus far DeXXus - keeping me sane, amused and alive
Can you NOT give phpWCMS it's OWN subdirectory??? As opposed to installing in the root to which you are redirecting??
Or did I miss something?

Posted: Sun 14. Dec 2003, 17:20
by pSouper
No error messages at all :(
It seams to be treating my image files as regular files, I can up and download just fine I cant ftp and move it with ftp_takeover too.
But When I try to insert the image as a into an article and navigate to the correct dir with "wcs image browser" I get 'no file' in the 'image file' list :(
It is also not creating a thumbnail or displaying the full image when clicked . In fact the window doesn't even have a 'click to close' or box with a red X for missing image
i'm sure the above isn't right either.

Code: Select all

Can you NOT give phpWCMS it's OWN subdirectory??? As opposed to installing in the root to which you are redirecting??
Or did I miss something?
I'm not sure if you can't use a subdir for phpwcms but I am sure that if you use a domain [www.tinytots.tv] to redirect to another domain [tinytots.dyndns.tv] with aditional arguments [tinytots.dyndns.tv/tinytos_remote/index.tv] then have that domain redirect to your server [my ip] implementing those arguments it gets messy ot the point that just by editing conf.inc you can only get some parts of the site to work and not others owing to path issues.
[i'm sure i'm right in saying this but who'd trust a newbie]

Posted: Sat 24. Jan 2004, 05:42
by gpin75
I was getting this error:

Please do not try again - this is an server error! Contact the webmaster to tell as soon as possible!

I went in and made sure "phpwcms_filestorage" was chmod'd to 777. it was. I then made certain all sub directories 1-10 were also chmod'd to 777. They weren't. Upon chmod'ing all directories under phpwcms_filestorage the error ceased. Working fine now. May help others...

Posted: Sat 24. Jan 2004, 11:37
by pSouper
thanks gSpin. i too fixed the issue and it turned out to be a simple pathing issue [i say simple, but it took me forever to figur it out ;) ]
I had to hardcode the "PHPWCMS_ROOT" in inc.default.php as thier seams to be a problem with using $_SERVER['DOCUMENT_ROOT'] with my system (or webmaster ;) )