Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

Thank you for your answer. The reason I posted my problem in this forum is because I'm not able to achieve the redirects with the codes suggested and in the end I told someone who know coding oscommerce to help me to solve the problem. However, he has been unable to solve it too. He suggested that it would be a problem of USU5.

As far as I can see, it could be a problem of my host like you say. I'll take into account your suggestion and I'll try.

 

Regards

Share this post


Link to post
Share on other sites

Update: I found where the problem with typeahead search resides. Now I need to figure out how to solve it :)

For the problem that twitter search is always searching in the default language :

 

In application_top you should surround the call to usu5 with an if-then :

 

If ($PHP_SELF != "autocomplete.php") { // added pvandebe on 19/04/2017 - to solve bug with autocomplete for twitter search

  Usu_Main::i()->setVar( 'languages_id', $languages_id )

               ->setVar( 'request_type', $request_type )

               ->setVar( 'session_started', $session_started )

               ->setVar( 'sid', $SID )

               ->setVar( 'language', $language )

               ->setVar( 'filename', $PHP_SELF )

               ->initiate( ( isset( $lng ) && ( $lng instanceof language ) ) ? $lng : array(), $languages_id, $language );

        }

 

There is still a problem when using special characters in the hreflang, that does not work at all. Allready digged into the code but I'm still not there yet. It looks like it doesn't return a UTF8 formatted string....

Share this post


Link to post
Share on other sites

Anyone any idea about the special character conversion in the hreflang ? Same problem in the language box.

 

Example : in French item "Shimano Clé Plateaux tl-fc22 chromé - Y13098240" has url  /fr/shimano-cle-plateaux-tl-fc22-chrome-y13098240-p-1600002.html

 

NICE

 

When I switch to another language and look at the url in href lang tag it shows :

 

/fr/shimano-clé-plateaux-tl-fc22-chromé-y13098240-p-1600002.html

Share this post


Link to post
Share on other sites

About CRON JOBS - finally I found a solution (working for me)!

Some hosting companies do not allow using wget and curl in cron jobs (for security reasons) - this was and my case. I am using USU 5 PRO r205 on Oscommerce 2.2RC2 and PHP 5.3 for my site. Hosting Server is running PHP 5.6

errors like:

Warning: include_once(): Failed opening 'includes/application_top.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/USER/public_html/googlesitemap/index.php on line 49
PHP Warning: require_once(googlesitemap/sitemap.class.php): failed to open stream: No such file or directory in /home/USER/public_html/googlesitemap/index.php on line 51

 in all scripts, that have include('includes/application_top.php'), include_once('includes/application_top.php'), require_once('googlesitemap/sitemap.class.php') .......

the solution (example is with googlesitemap folder and script):

set cron job command like this - cd /FULL PATH/googlesitemap && /usr/local/php5.3/bin/php -c /FULL PATH TO CATALOG/php53-fcgi.ini index.php

 cd - most importatnt - setting the correct dirrectoy to run the script

php53-fcgi.ini - my custom php.ini file to use PHP 5.3 for my website

FULL PATH - looks like /home/USER/public_html/ or /home/USER/public_html/YOURSITE/ etc.

FULL PATH TO CATALOG - maybe the same as FULL PATH

index.php - this is the index file in googlesitemap directory, that I must run to update sitemap xml files.

 

nikibarudov

Edited by Jan Zonjee
changed path

Share this post


Link to post
Share on other sites

I forgot. This is the path to php

 /usr/local/php5.3/bin/php - it may vary - check your path to php

Edited by nikibarudov

Share this post


Link to post
Share on other sites

Hi everybody,


just examined php error logs and discovered that USU5 database cache system was attacked with sql injection codes. Its probably a security issue if someone use database (mysql or sqlite) cache interfaces.
I dont have any imagination how could be registered into MySQL UNION script but looks like very danger.

DO NOT USE database cache modules!

@raiwa

Could you drop database cache modules or fix it in responsive/original addons?

An error example with file cache module:

[21-Mar-2017 xx:xx:xx Europe/X] PHP Warning:  file_put_contents(/xxxxx/xxxxxxx/xxxxxxxxxxx.xx/includes/modules/ultimate_seo_urls5/cache_system/cache/2_index_manufacturers_id_23111111111111120UNION20SELECT20CHAR4512049458145CHAR4512050458145CHAR4512051458145CHAR4512052458145CHAR4512053458145CHAR4512054458145CHAR4512055458145CHAR4512056458145CHAR4512057458145CHAR451204948458145CHAR451204949458145CHAR451204950458145202020.cache) 

[<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: File name too long in /xxxxx/xxxxxxx/xxxxxxxxxxx.xx/includes/modules/ultimate_seo_urls5/cache_system/file.php on line 82

I am afraid that injection script stored directly when database interface used.


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

@Gergely,

I just did a fast check in my add-ons and there is no caching feature used any more in the latest product info content modules (related products and recently viewed) .

In other modules no caching has been used ever as far as I'm aware.

Or do I miss something and you refer to any other in concrete??

 

Between: Thanks for the advice :wink:

 

Edit: Or do you refer to the SEO URL support for the old iosc Mobile add-on? The cache feature is not affected there by my iosc Mobile modifications.

Edited by raiwa

Share this post


Link to post
Share on other sites

@raiwa

I am talking about \Ultimate_Seo_Urls_5_PRO_BS_208\new_files\catalog\includes\modules\ultimate_seo_urls5\ cache module files.


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

in Google Webmaster Tools, HTML Improvements. I have almost all my web pages duplicate titles. e.g.

/index.php/pos-system-signature-capture-c-155_185_2093_0_45_252_474
/index.php/pos-system-signature-capture-c-155_45_252_474

another e.g.

/product_info.php/targus-bag-tss588us-156-black-p-6437
/product_info.php?products_id=6437

Why ? and what should I do ? thanks

Share this post


Link to post
Share on other sites

@Gergely, that's not me. I never uploaded anything to Ultimate SEO URL5. You are cunfused it's @piernas who uploaded the BS version.

Share this post


Link to post
Share on other sites

@Psytanium

use cannonical header tag

@raiwa

Ah sorry Rainer!


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

@Gergely, If I understood correct this can also affect filecache? Then the other SEO URL add-ons like serie 2 by chemo now maintained by @Jack_mcs may also be affected?

Share this post


Link to post
Share on other sites

@raiwa

Not exactly its attack only mysql. Probably mysql 5.6
I remember something from the past... Secure App:
https://apps.oscommerce.com/o19Sn&security-pro-2-0-r7

It could be a Hook. catalog/includes/hooks/shop/global/security_pro.php


From Security Pro Start here page:

Quote

Yes it is still just as valid. The target of Security Pro is not the core osCommerce coding which we all know is good, the target is the thousands of contributions which are usually poorly written.

This is all new code but the concept remains the same .. with Security Pro installed it is impossible to pass bad characters through the querystring so long as the page loads application_top.php, which all osCommerce pages do.

:biggrin:

Edited by Gergely

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites
9 hours ago, Psytanium said:

@Gergely already enabled, I checked the view-source, I can see the


<link rel="canonical" href="https://macrotronics.net/product_info.php/samsung-850-evo-500gb-ssd-mz-75e500b-p-12045" />

in the header

could be the htaccess ?

Its time for the google to repair it.

My solution:

https://github.com/Gergely/oscommerce2-addons/compare/cPath_validation
 

Run this sql script before update:
 

ALTER TABLE `categories` 
ADD COLUMN `cpath` VARCHAR(255) NOT NULL AFTER `last_modified`;

 


:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Share this post


Link to post
Share on other sites

Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites
function tep_reset_cache_data_usu5($action = false) { //line 1702
    if ( $action == 'reset' ) {
      $usu5_path = realpath( dirname( __FILE__ ) . '/../../../' ) . '/' . 'includes/modules/ultimate_seo_urls5/';
      switch( USU5_CACHE_SYSTEM ) {
        case 'file': 
          $path_to_cache = $usu5_path . 'cache_system/cache/';
          $it = new DirectoryIterator( $path_to_cache );
          while( $it->valid() ) {
            if ( !$it->isDot() && is_readable( $path_to_cache . $it->getFilename() ) && ( substr( $it->getFilename(), -6 ) == '.cache' ) ) {
              @unlink( $path_to_cache . $it->getFilename() );
            }
            $it->next();
          }
          break;
        case 'mysql':
          tep_db_query( 'TRUNCATE TABLE `usu_cache`' );
          break;
        case 'memcache':
          if ( class_exists('Memcache') ){
            include $usu5_path . 'interfaces/cache_interface.php';
            include $usu5_path . 'cache_system/memcache.php';
            Memcache_Cache_Module::iAdmin()->initiate()
                                           ->flushOut();
          }
          break;
        case 'sqlite':
          include $usu5_path . 'interfaces/cache_interface.php';
          include $usu5_path . 'cache_system/sqlite.php';
          Sqlite_Cache_Module::admini()->gc(); 
          break;
      }
      tep_db_query( "UPDATE configuration SET configuration_value='false' WHERE configuration_key='USU5_RESET_CACHE'" );
    }       
  } // end function 

i got this error 

Parse error: syntax error, unexpected T_STRING in /admin/includes/functions/general.php on line 1702

 

 

Edited by Gergely
php code highlight

Share this post


Link to post
Share on other sites

Hello,

I have a problem with 404, I use a custom 404 page, but if I enter on a product that his status is set to zero, I got a USU5 404

Someone knows how to get my custom 404 page not found?

Thanks in advance :)

Gustavo

Share this post


Link to post
Share on other sites

I tried to change in /cataalog/includes/modules/ultimate_seo_urls5/main/bootstrap.php

 

    private function pageNotFound() {
      include_once Usu_Main::i()->getVar( 'includes_path' ) . 'uri_redirects_class.php';
      if ( false !== ( $url = Uri_Redirects::i()->needsRedirect() ) ) {
        $this->redirect( $url );
      }
      session_write_close();
      header( "HTTP/1.0 404 Not Found" );
//      include_once Usu_Main::i()->getVar( 'includes_path' ) . 'notfound_404.php';
      include_once Usu_Main::i()->getVar( 'base_url_ssl' ) . '404.php';
      exit;
    }

The url for the 404 page to my custom 404 page in catalog/404.php without solution.

Anybody have fix this?

Thanks in advance :)

Share this post


Link to post
Share on other sites
19 hours ago, PiLLaO said:

I tried to change in /cataalog/includes/modules/ultimate_seo_urls5/main/bootstrap.php

 


    private function pageNotFound() {
      include_once Usu_Main::i()->getVar( 'includes_path' ) . 'uri_redirects_class.php';
      if ( false !== ( $url = Uri_Redirects::i()->needsRedirect() ) ) {
        $this->redirect( $url );
      }
      session_write_close();
      header( "HTTP/1.0 404 Not Found" );
//      include_once Usu_Main::i()->getVar( 'includes_path' ) . 'notfound_404.php';
      include_once Usu_Main::i()->getVar( 'base_url_ssl' ) . '404.php';
      exit;
    }

The url for the 404 page to my custom 404 page in catalog/404.php without solution.

Anybody have fix this?

Thanks in advance :)

The problem is that the 404.php in root folder is like a "shipping" page and try to load application_top.php, so I get this error:

PHP Fatal error:  Cannot redeclare usu5_base_filename() (previously declared in /includes/application_top.php:56)

Any help will be apreciated :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×