Tuesday, July 17, 2012

htaccess file invisible on ftp

Once again i faced with this problem...

I have connected to ftp to edit htaccess file but it is invisible. I use PSPad Editor with ftp client support.

Here is how to fix


Invisible files on ftp in PSPad:
1. Edit your ftp connection
2. Check checkbox with text - "Show hidden files (must be supported by FTP server)"
3. Reconnect
4. Done.

Cureftp fixing hidden files:

1. Open CuteFTP and Enter Hostname , Username and Password.
2. Click Action tab in Settings
3. Click on Filter button
4. tick on Enable server side filtering
5. Enter -a in Remote filter
6. Click on apply & connect.

FileZilla fix to see invisible files:

For FileZilla 2,
1. Click on Settings.
2. Select Edit -> Settings -> Interface settings -> Remote file list
3. Tick check box syas Always show hidden files & press ok.

For FileZilla 3,
1. Click on Server from top navigation.
2. Click on Force showing hidden files at last option
3. Press ok when it shows warning.

Thursday, July 12, 2012

WARNINGcall_user_func_array() expects parameter 2 to be array, string givenError in line 649

Today i faced with JCE joomla image manager problem. It was displaying all the time when i tried to insert or edit image.
PHP Error Message: WARNINGcall_user_func_array() expects parameter 2 to be array, string givenError in line 649 of file /customers/global-trade.dk/global-trade.dk/httpd.www/plugins/editors/jce/libraries/classes/plugin.php
So here is how to fix it:
1) Go to /plugins/editors/jce/libraries/classes/plugin.php,2) You should see the line code:
$result = call_user_func_array( $func, $args );
3) Edit it to this code:
$result = call_user_func_array( $func, (array)$args );
4) Save and go insert / edit images!

Source: http://ow-s.com/interesnye-stati/82-problema-s-jce-redaktorom-na-novyx-versiyax-php.html 

Thursday, July 5, 2012

OpenX remove Trojan program HEUR:Trojan.Script.Iframer



So for last few days i was faced with the Trojan which was injected into OpenX.

So here is my guide how to remove it.

1. First of all create
`banners` copy like `banners_2` ( so it be backup if you will need it ).

2. Lanch the query to remove unwanted virus / trojan code snippets

UPDATE `banners` SET `htmltemplate` = '', `htmlcache` = '', `append` = ''
WHERE 1
AND
(
`htmltemplate` LIKE '%BrowserDetect%' OR `htmltemplate` LIKE '%function hex2a(hex)%' OR`htmlcache` LIKE '%BrowserDetect%' OR ` htmlcache ` LIKE '%function hex2a(hex)%' OR`append` LIKE '%BrowserDetect%' OR ` append ` LIKE '%function hex2a(hex)%')

[EDIT]
Launch same query for zones table
UPDATE `zones` SET `append` = ''
WHERE 1
AND
(
`append` LIKE '%BrowserDetect%' OR ` append ` LIKE '%function hex2a(hex)%')

[EDIT end]

3. Do OpenX update to latest version ( 2.8.9 for current moment )

4. After you update your OpenX, lanch query at (2) for one more time.

5. At this stage you will need to clear cache or just wait to renew it by itself.. I didnt deleted it, so i cant tell you anything about how to do it. If you OpenX is huge i dont recommend you to delete it., better ask someone who knows anything about "grep" ( Google scan command? ).
Cache exists in var/cache/

[EDIT]
6. After all this cleanings we still couldn't find the trojan by itself, but banners and zones position were infected from time to time...
Solution for this was to limit`append` field attribute length to '10' symbols. It helped us for now...
[EDIT end]

These are steps which we took and a bit more..

Hope it will help you. Good luck, you will need it.

p.s. a bit more information can be fount here:
http://www.openxconsultant.com/blog/2011/10/what-to-do-when-you-suspect-your-openx-system-has-been-hacked/