images upload problem

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Moozie
Posts: 164
Joined: Sat 8. Nov 2003, 00:21
Location: Netherlands

images upload problem

Post by Moozie »

I have the whole script working. Only 1 thing is still bugging:

Question 1:
When I try to upload an image in a created dir I get the following error:

Error while creating user directory.
Please do not try again - this is an server error! Contact the webmaster to tell as soon as possible!

If I upload it to the root I get the error:

Error while writing file to storage (2).

Could this have something to do with "directory listing". It's turned off and we can turn it on with a .htaccess file in the dir we want to list. Or we could try to set it on side-wide.

Yesterday we did manage to uploade some pics. I see the following in the dir:
/phpwcms/phpwcms_filestorage/2/2_13.jpg
I can show this image in my browser by pointing to the correct url. Si it is there. But in the admin it shows the name of the image, but no example if you click it, and no other images can be uploaded.

I assume that the /2/ means that it is a user directory. So why the error "can not create user dir"?

Question 2:
What can I do with filecats? Isn't that the same as subdirs in the images directory?

Thanx for answering.

Moozie

--------------------------------------------------------------------
By the way, when I check my servers error_log I see that every time I try to upload a picture, the following line is added in the error_log:

File does not exist: /home/httpd/vhosts/zone51.nl/httpdocs/img/sp1.gif

We installed the program in:
/home/httpd/vhosts/zone51.nl/httpdocs/phpwcms. So that dir "phpwcms" is not shown in the error log. Could that be the cause??? And where can I correct that. The rest of the prog workd fine. So in other paths the phpwcms dir is correctly supplied....
Moozie
Posts: 164
Joined: Sat 8. Nov 2003, 00:21
Location: Netherlands

Post by Moozie »

Additional info:

Ahaa: The same problem with the missing directory /phpwcms/ also occurs on other places. This is the error I get when I try to modify the page layout title-information:

Warning: fopen(/home/httpd/vhosts/zone51.nl/httpdocs/include/inc_conf/conf.pagelayout.inc.php): failed to open stream: No such file or directory in /home/httpd/vhosts/zone51.nl/httpdocs/phpwcms/include/inc_lib/general.inc.php on line 658

Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/zone51.nl/httpdocs/phpwcms/include/inc_lib/general.inc.php:658) in /home/httpd/vhosts/zone51.nl/httpdocs/phpwcms/include/inc_act/act_pagelayout.php on line 145

Somewhere the script fails to put the correct install dir to an url, so it pastes the needed subdir just behind the domainnam, without the subdir in which the script is installed.

Does that ring a bell where something went wrong?
Please help.
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

You have not defined the phpwcms["root"] path var. Post your path info without password/username.

You can also compare this:

Code: Select all

.nl/httpdocs/include/
.nl/httpdocs/phpwcms/include/

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Moozie
Posts: 164
Joined: Sat 8. Nov 2003, 00:21
Location: Netherlands

Post by Moozie »

OK that solves the file upload problem.

// paths
$phpwcms["root"] = "phpwcms";

That was empty. Now it works.
Moozie
Posts: 164
Joined: Sat 8. Nov 2003, 00:21
Location: Netherlands

Post by Moozie »

Still not all the path errors are gone.

For example if I go into File center and click on edit a picture, my servers error_log appends a line:

Sample 1:
File does not exist: /home/httpd/vhosts/mydomain.nl/httpdocs/img/sp1.gif

Now it seems that the phpwcms dir is missing in the link. It should read:
/home/httpd/vhosts/mydomain.nl/httpdocs/phpwcms/img/sp1.gif

How can this be?
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

I've searched for it and found the error in "files.private.editfile.tmpl.php" Line 242.

it is not critical -> it's only a 1x1 transparent GIF.

Code: Select all

<td align="right" valign="top" class="v09"><img src="../../img/sp1.gif" width="1" height="13">long info:&nbsp;</td>
has to be

Code: Select all

<td align="right" valign="top" class="v09"><img src="img/sp1.gif" width="1" height="13">long info:&nbsp;</td>

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Moozie
Posts: 164
Joined: Sat 8. Nov 2003, 00:21
Location: Netherlands

Post by Moozie »

I changed that, but still the error appears in the servers log file...

Maybe the same mistake is there in another file???
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

There is one more :wink: in "files.private.upload.tmpl.php"

I think it was in line 246 - look for src="../../img/sp1.gif" and make it src="img/sp1.gif"

I have searched complete code.


Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Moozie
Posts: 164
Joined: Sat 8. Nov 2003, 00:21
Location: Netherlands

Post by Moozie »

Changed that one too. But... still the same error appears:

File does not exist: /home/httpd/vhosts/mydomain.nl/httpdocs/img/sp1.gif

Mmmm
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Can try to find out which file this could be?

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Moozie
Posts: 164
Joined: Sat 8. Nov 2003, 00:21
Location: Netherlands

Post by Moozie »

OK, I tested it again and the error appears when I:

1. upload a new picture to any dir or root dir
2. edit a picture

Maybe this is of any help.
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Maybe your both files are not updated correctly - I have tested this - no error anymore.

Don't forget to update files on webserver too ;-)

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Moozie
Posts: 164
Joined: Sat 8. Nov 2003, 00:21
Location: Netherlands

Post by Moozie »

I double checked it and both files were updated as you told. But still the error appears in the log file when I press edit a pic or upload a pic.

The error appears with time-stamp so I know it's caused by the action of this very minute.

What could I do? I know it's a non critical error, but I like it to disappear.
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Sorry! I have no advice to you.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply