v511 - Install complete but all compressed CSS are empty

1 view
Skip to first unread message

Phil -- wbtc.fr --

unread,
Nov 30, 2010, 4:08:53 PM11/30/10
to in-port...@googlegroups.com
Hello,

I'm installing v511 on a mutualized server, this is  a good case because even I have SSH access, I can't modify the server settings according to in-portal desires :)

Install have run smoothly, but compressed CSS are empty, in front and in admin. Debug mode doesn't seems to load also. This server have surely some protections against php execution in some cases (I noticed I have an error 500 if I try to execute a php file under a 777'd directory for example).

All credentials will be sent as private message to you guys.

Thanks for looking into this.

P.

Dmitry Andrejev

unread,
Nov 30, 2010, 4:15:12 PM11/30/10
to in-port...@googlegroups.com
Thanks for reporting Phil!

We'll be happy to look into this.


DA

--
You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.



--


Best regards,

Dmitry A.

Phil -- wbtc.fr --

unread,
Nov 30, 2010, 4:25:48 PM11/30/10
to in-port...@googlegroups.com
well, I sent you all credentials, I hope you'll find the trick !

2010/11/30 Dmitry Andrejev <dand...@gmail.com>

Dmitry Andrejev

unread,
Dec 1, 2010, 4:40:24 PM12/1/10
to in-port...@googlegroups.com
Hi,

There is an issue on some hosting server with generating JS/CSS compressed files. This issue is related to recent improvement which adds ability to use JAVA Class to do a better compression.

The following code haven't full worked as expected on examined hosting server:

[code]
$command = 'java -jar ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'yuicompressor-2.4.2.jar --type ' . $extension . ' --charset utf-8 ' . $tmp_file;

$compressed_string = shell_exec($command);

unlink($tmp_file);

if (!is_null($compressed_string)) {
 $string = $compressed_string;
 return ;
}
[/code]

The solution is to add check if $compressed_string has any length in additional to it's not being NULL. Alternatevely we can leave just a simple check like

if (!$compressed_string) {
...
}


Alex, please comment.


Here is a patch + task:

943: Minor Issue with generating JS/CSS compressed files


-- 


Best regards,

Dmitry A.

Issue-with-generating-JS-CSS-compressed-files.patch

Dmitry Andrejev

unread,
Dec 1, 2010, 4:40:49 PM12/1/10
to in-port...@googlegroups.com
Phil,

Your local version has been fixed already.

Thanks.

Phil

unread,
Dec 1, 2010, 4:42:19 PM12/1/10
to In-Portal Bugs Team
Hi Dmitry,

thank for solving this !

Phil.
> On Tue, Nov 30, 2010 at 3:25 PM, Phil -- wbtc.fr -- <p...@wbtc.fr> wrote:
>
> > well, I sent you all credentials, I hope you'll find the trick !
>
> > 2010/11/30 Dmitry Andrejev <dandre...@gmail.com>
>
> > Thanks for reporting Phil!
>
> >> We'll be happy to look into this.
>
> >> DA
>
> >> On Tue, Nov 30, 2010 at 3:08 PM, Phil -- wbtc.fr -- <p...@wbtc.fr> wrote:
>
> >>> Hello,
>
> >>> I'm installing v511 on a mutualized server, this is  a good case because
> >>> even I have SSH access, I can't modify the server settings according to
> >>> in-portal desires :)
>
> >>> Install have run smoothly, but compressed CSS are empty, in front and in
> >>> admin. Debug mode doesn't seems to load also. This server have surely some
> >>> protections against php execution in some cases (I noticed I have an error
> >>> 500 if I try to execute a php file under a 777'd directory for example).
>
> >>> All credentials will be sent as private message to you guys.
>
> >>> Thanks for looking into this.
>
> >>> P.
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "In-Portal Bugs Team" group.
> >>> To post to this group, send email to in-port...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsu...@googlegroups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/in-portal-bugs?hl=en.
>
> >> --
>
> >> Best regards,
>
> >> Dmitry A.
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "In-Portal Bugs Team" group.
> >> To post to this group, send email to in-port...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/in-portal-bugs?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "In-Portal Bugs Team" group.
> > To post to this group, send email to in-port...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > in-portal-bug...@googlegroups.com<in-portal-bugs%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/in-portal-bugs?hl=en.
>
>
>
>  Issue-with-generating-JS-CSS-compressed-files.patch
> < 1 000AfficherTélécharger

Alexander Obuhovich

unread,
Dec 2, 2010, 1:39:04 PM12/2/10
to in-port...@googlegroups.com
Why exactly "shell_exec" was returning empty string instead of null on that server? Did the command work when you run it in shell (ssh)?


To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.

Dmitry Andrejev

unread,
Dec 2, 2010, 2:06:32 PM12/2/10
to in-port...@googlegroups.com
1. This is the output from running Java command in shell:

campagnek@ssh1:~/www/in-portal/system/cache$ java -jar /homez.218/campagnek/www/in-portal/core/units/helpers/minifiers/yu
icompressor-2.4.2.jar --type css --charset utf-8 /tmp/to_compress_IOdV2D

-ovh_ssh: java: command not found

2. shell_exec($command) returns Empty string - no idea why, I have enabled all reporting during the tests - no results, no errors or warnings! PHP info doesn't show it as restricted, but it's on PHP 4


DA
Best regards,

Dmitry A.

Alexander Obuhovich

unread,
Dec 2, 2010, 2:14:48 PM12/2/10
to in-port...@googlegroups.com
Then maybe it's restricted hosting, since "shell_exec" manual page says, that command output is returned. Then check should made via if ( "$compressed_string" !== '' ).

Dmitry Andrejev

unread,
Dec 2, 2010, 3:36:57 PM12/2/10
to in-port...@googlegroups.com
Do we really need to make the check like?  if ( "$compressed_string" !== '' )

and simple if (compressed_string)


Can please describe the case when if (compressed_string) is not going to work?


DA

Phil -- wbtc.fr --

unread,
Dec 2, 2010, 3:41:18 PM12/2/10
to in-port...@googlegroups.com
let me add this is on a virtual server of one of the biggest hosting comp. in Europe (OVH), then they surely have many extra security we don't have on smaller hosts...

2010/12/2 Dmitry Andrejev <dand...@gmail.com>

Alexander Obuhovich

unread,
Dec 2, 2010, 3:54:45 PM12/2/10
to in-port...@googlegroups.com
Seems, that both our solutions result in none compression is make, when java is not available.

That's bad, since in this case default compression classes (JsMin) should be used.
Reply all
Reply to author
Forward
0 new messages