after enabling the relase canidate, i get this error message:

Die ausgewählte Datei D:\server\htdocs\www.domain.com\tmp\fil18BE.tmp  konnte nicht kopiert werden.

that means in english something like:

The selected file D:\server\htdocs\www.domain.com\tmp\fil18BE.tmp  could not be copied.

But the compression seems to work.

Drupal 6.16
Windows Server 2008 R2
Apache 2.2.14
MySQL 5.1.41
PHP 5.3.1

Comments

philbar’s picture

Interesting, I don't think this is something caused by CSSTidy.

Is your server PHP install configured to in SAFEMODE? If so ask your host to turn it off.

See also:
http://drupal.org/node/229395
http://drupal.org/node/84405

XerraX’s picture

Sorry i didnt search first. But no it does not run in safemode.

CSSTidy enabled ->
error message

CSSTidy disabled ->
no error message

Well maybe its not CSSTidy, i cant tell that for sure. But this is what happens.

In my apache error log is no message.

philbar’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not sure where this would be coming from. I'm no php expert, but I can't find any thing in this module that is writing to a tmp directory. Unless I'm mistaken, everything is written in the /files directory of your site.

Are you having the same problem with CSS Embedded Images? Because this module is basically a stripped down version of that module, which has been modified to run the CSSTidy parser.

If CSS Embedded Images runs fine, without the error, then it's something in the CSSTidy project. Unfortunately I will not be able to fix that because it's upstream of this module.

I did search for "CSSTidy + could not be copied." and didn't get any relevant results, so I don't think it's a problem with CSSTidy. It's likely something with Drupal and conflicting modules.

XerraX’s picture

Priority: Normal » Minor

I installed 6.x-1.0 of CSS Embedded Images and got the same error message. But i noticed that the error message only appears only on the first page i open after enabling the module.

So i checked back on CSSTidy and it has the same behavior.

I think its a minor bug or incomapatility that can be ignored.

Btw sorry for my bad english.

philbar’s picture

Project: CSSTidy » CSS Embedded Images
Version: 6.x-1.0-rc1 » 6.x-1.0
Status: Postponed (maintainer needs more info) » Active

I'll add it to the CSS Embedded Image issue queue and see if a solution pops up there.

jcarnett’s picture

It looks like an issue with the files directory not being writable. If you check your site's status report (Administer > Reports > Status report) does it have any messages about the file system?

You can make sure subdirectories are writable using something like: chmod -R ugo+rw sites/default/files

XerraX’s picture

it says:

Dateisystem	Beschreibbar (öffentliche Download-Art)

in english something like:

Filesystem	writable (public Downloads)

Be aware its a windows server with apache, so chmod wont work. Anyway the subdirectories are writable.

jcarnett’s picture

What are your settings in Administer > Site configuration > File system? Searching around a bit it looks like this can also be related to Drupal's temporary directory setting. You might try changing that to a directory you create rather than using a system-wide temporary directory.

XerraX’s picture

I tried different paths. Inside web root, outside web docs, inside website folder etc. This does not seem to change things. I cant imagine this is the bug, because the folder has files.

XerraX’s picture

Project: CSS Embedded Images » CSSTidy
Version: 6.x-1.0 » 6.x-1.x-dev

Does this part work on windows system?

function _csstidy_process($styles) {
  $path_to_files_directory = base_path() . file_directory_path();
  $pattern = '/<link(.*?)href="' . preg_quote($path_to_files_directory, '/') . '(.*?)"(.*?)\\/>/';

i tried this to see what happens:

<?php
$path_to_files_directory = base_path() . file_directory_path();
$result = preg_quote($path_to_files_directory, '/');
echo $result;
?>

and the output is:

\/files

Does not look like a correct path to me. Am i wrong?

philbar’s picture

That's normal.

In PHP, the character directly following a '\' is read as normal text rather than PHP. For example, if you want to write something in php like "5 = 5" you need to write "5 \= 5" or else, PHP will try to calculate the code rather than display it.

philbar’s picture

Status: Active » Postponed (maintainer needs more info)

Are you having a problem with CSS Embedded Image as well?

This project shares much of the same code.

XerraX’s picture

yes its the same behavior on both modules.

new infos:
- i thought the error message only appears on the first page that opens after enabling this module. this is not correct, after cleaning the cache, the message appears on all pages.
- there are empty files created by these modules, with 0 byte size. so path must be set correctly.

i really would like to use this module =/

philbar’s picture

Project: CSSTidy » CSS Embedded Images
Status: Postponed (maintainer needs more info) » Active

Well, I'm out of ideas. Since CSSTidy is essentially a clone of CSS Embedded Images, I'm moving it to that issue queue to see if you can find a solution there.

philbar’s picture

Project: CSS Embedded Images » CSSTidy
Status: Active » Closed (cannot reproduce)