Malware:SPAM:SEO – (MODx Evolution: removing spam links)

MODx Evolution based website has been detected hacked. Every page of his website showing “infected” with invisible links to viagra webshops. The code of those links was as follows:

<div style="position:absolute;left:-2311px;top:-2794px;"><a href="LINK">... viagra ...</a></div>

After quick investigation I figured out the malicious code (which generated those links) had been planted into the MySQL table “modx_site_plugins“.  In our case it was inside “Quick ManagerManager” plugin code:

Basically, look for: @eval(@gzuncompress(@str_rot13(@base64_decode(

After removing the code I’ve also replaced the entire assets/cache/ folder with one from the MODx distributive.

Malware checking link: http://sitecheck.sucuri.net

Error: Function split() is deprecated

Solution:

You need to use FTP server to fixed the problem.

Step # 1 :  Go to ../manager/includes/config.inc.php

Find the line  – May be 13 lines

error_reporting(E_ALL & ~E_NOTICE);

Replace by the line

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);


Step # 2:  Go to  ../manager/includes/document.parser.class.inc

Find the line – May be 2502

 if (error_reporting() == 0 || $nr == 0 || ($nr == 8 && $this->stopOnNotice == false)) {

Replace by

if (error_reporting() == 0 || $nr == 0 || (error_reporting() & $nr) != $nr || ($nr == 8 && $this->stopOnNotice == false)) {

Loading fast for wordpress site

Give your site a boost! Implement crucial optimization techniques that will improve not only your ySlow score, but your Google rank too. In this tutorial we will cover all aspects of W3 caching, ySlow, Google page speed, CSS sprites & htaccess rules, to achieve a high ySlow score

Ref: http://wp.tutsplus.com/tutorials/the-ultimate-quickstart-guide-to-speeding-up-your-wordpress-site/

Your backup folder MIGHT be visible to the public

Problem: To correct this issue, move the .htaccess file from wp-content/plugins/wp-dbmanager to /home/websitename/public_html/wp-content/backup-db

Solution:

Step#1:

Go to:  /home/public_html/wp-content/plugins/wp-dbmanager  -> download the file htaccess.txt

Step#2:

Rename the file name .htaccess then upload it following the path:

/home/public_html/wp-content/backup-db

N.B: You can use FTP or cPanel for upload.

WordPress login and logout for custom template

Login and logout link (way – 1):

[code]

<code><?php wp_loginout();?></code>

[/code]

Login and logout page with custom links (way – 2):

[code]
<?php
if ( is_user_logged_in() ) {
echo ‘<a href="’.wp_logout_url().’" title="Logout">Log out of my site</a>’;
} else {
echo ‘<a href="’.wp_login_url().’" title="Login">Log in to my site</a>’;
}
?>
[/code]

Login and logout page with custom links and redirect to previous page (way – 3):

[code]
<?php
if ( is_user_logged_in() ) {
echo ‘<a href="’.wp_logout_url( get_permalink() ).’" title="Logout">Log out of my site</a>’;
} else {
echo ‘<a href="’.wp_login_url( get_permalink() ).’" title="Login">Log in to my site</a>’;
}
?>
[/code]

Custom login and logout pages with custom links (way – 4):

[code]
<?php
if ( is_user_logged_in() ) {
echo ‘<a href="’.wp_logout_url( home_url() ).’" title="Logout">Logout</a>’;
} else {
echo ‘<a href="’.get_permalink( 22 ).’" title="Login">Login</a>’;
}
?>
[/code]

UPS shipping problem for osCommerce

Solution:

Locate: catalog -> includes -> module -> shipping -> usps.php  (about line 95)

[code] list($type, $cost) = each($uspsQuote[$i]); [/code]

Add these lines after it

[code]

$type = str_replace(‘&amp;lt;sup&amp;gt;&amp;amp;reg;&amp;lt;/sup&amp;gt;’, ”, $type);
$type = str_replace(‘&amp;lt;sup&amp;gt;&amp;amp;trade;&amp;lt;/sup&amp;gt;’, ”, $type);
$type = str_replace(‘**’, ”, $type);

[/code]

Paypal solution

Problem: Unable to process payment. Please contact the merchant as the shipping address provided by the merchant is invalid, and the merchant has requested that your order must be shipped to that address.

Solution:

Admin->Modules->Payment->PayPal Website Payments Standard->Edit, and change Address Override from 1 to 0

in the file plugins/paypal/paypal.php
please comment this line ( in the function plgVmConfirmedOrder

[code]"address_override" => "1",[/code]

In the next version, this parameter will be set via the Paypal configuration.

This parameter sets the overriding addresses stored with PayPal
For people who already have PayPal accounts and whom you already prompted for a shipping address before they choose to pay with PayPal, you can use the entered address instead of the address the person has stored with PayPal.

Error 503: Service Unavailable

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Solution:

There are two main reasons why you may get this error.

1. There is an actual problem with the server, resulting in the 503 error response. In this case, you should contact your hosting provider.

2. Your store has been put in maintenance mode. If Magento sees a file named maintenance.flag in the root directory, it will automatically redirect all requests to the default 503 error page. This can be used during upgrades, etc. to prevent users from accessing the store. The solution is, as already mentioned, to delete/rename the maintenance.flag file.

There might also be a good idea to create a more user friendly “maintenance page” than the 503 error, which is kind of misleading for customers.