Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Google reCAPTCHA v3


ruden

Recommended Posts

On 1/5/2020 at 12:12 AM, TomB01 said:

Never mind - my mistake. 

Thanks for the add-on!

Hi, what was your mistake?

I have the same issue.

 

Edit: ok nevermind.... try clicking on the "install module" button 😁

Edited by hybiepoo
I'm dumb
Link to comment
Share on other sites

Add-on updated

Add support Hook System

⚠️ This add-on use Hook System, for versions below < 2.3.5 install Hook System

https://apps.oscommerce.com/p9Yyp&hook-system

On 1/30/2020 at 7:36 AM, NateNg said:

How to implement in pwa_account.php?

Create directory  includes/hooks/shop/pwa_account

Copy file includes/hooks/shop/create_account/Recaptcha3.php in includes/hooks/shop/pwa_account

In file includes/hooks/shop/pwa_account/Recaptcha3.php

replace $this->form_name = basename(dirname(__FILE__));

$this->form_name = 'create_account';

Edited by ruden
Link to comment
Share on other sites

19 hours ago, ruden said:

Add-on updated

Add support Hook System

⚠️ This add-on use Hook System, for versions below < 2.3.5 install Hook System

https://apps.oscommerce.com/p9Yyp&hook-system

Create directory  includes/hooks/shop/pwa_account

Copy file includes/hooks/shop/create_account/Recaptcha3.php in includes/hooks/shop/pwa_account

In file includes/hooks/shop/pwa_account/Recaptcha3.php

replace $this->form_name = basename(dirname(__FILE__));

$this->form_name = 'create_account';

hi

i installed the plugin,

is it a hidden type thing?

i cannot see it on the create account page when i sign up for something

Link to comment
Share on other sites

On 2/3/2020 at 11:32 AM, ruden said:

Add-on updated

Add support Hook System

⚠️ This add-on use Hook System, for versions below < 2.3.5 install Hook System

https://apps.oscommerce.com/p9Yyp&hook-system

Create directory  includes/hooks/shop/pwa_account

Copy file includes/hooks/shop/create_account/Recaptcha3.php in includes/hooks/shop/pwa_account

In file includes/hooks/shop/pwa_account/Recaptcha3.php

replace $this->form_name = basename(dirname(__FILE__));

$this->form_name = 'create_account';

Yes, It is working.

Thank you so much.

Link to comment
Share on other sites

  • 4 weeks later...

Small nit:

For v3 Recaptcha Google recommends enabling the tracking code on EVERY page load, not just ones you want to protect.  This enables Google to create a traffic profile.  e.g. if a customer has been shopping the site normally but then submits a contact us in a suspicious way (e.g. did a copy-paste autofill which was very fast) Google takes into account the non-spammy behavior beforehand.

It looks like your module only loads on the hooked pages, I suggest loading the tracking code on all pages following Google's guidance.

Two forks diverged in a git, and I— I took the fork traveled by burt, And that has made all the difference.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Hi  Ruden

Thanks for recaptcha v3 addon , i successfully install on my old website and it works great Installed Version: osCommerce Online Merchant v2.3.3 .

I did a fresh install of this addon on a new site Installed Version: osCommerce Online Merchant v2.3.4.1 CE. 

i installed hook addon as well but when i click HOOK in admin//modules_hooks.php a blank page appears.

Also website home page bring HTTP ERROR 500 .

what i am doing wrong , can you guide me please.

Thanks

 

Link to comment
Share on other sites

@ruden   Below is php error logs

 

[Sun Apr 05 23:02:31 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:02:34 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:02:35 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:02:35 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:02:47 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:02:48 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:02:55 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:04:23 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:04:24 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:04:25 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:04:25 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:04:27 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:04:28 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:05:55 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:05:57 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:05:58 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:05:59 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:00 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:00 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:02 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:03 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:08 2020] [error] [client xx.xx.xx.xx.138] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:32 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:33 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:07:50 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:07:50 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:12:10 2020] [error] [client xx.xx.xx.xx.138] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:12:34 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:02 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:03 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:04 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:06 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:07 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:07 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:10 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:14 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:25 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:41 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:13:41 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:13:49 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:13:49 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:18:17 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:19:54 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:20:28 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:23:09 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:24:12 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13

 

Link to comment
Share on other sites

Include class hooks two times

remove duplicate in /includes/application_top.php  and /admin/includes/application_top.php

require(DIR_FS_CATALOG . 'includes/classes/hooks.php');

Link to comment
Share on other sites

thanks,

i found duplicate entry and removed from includes/application_top.php

admin/includes/application_top.php only found single entry means no duplication.

after this website home page appearing normal,

but in shop admin ---- admin/modules_hooks.php page goes to blank.

let me copy new php errors to you .

Link to comment
Share on other sites

[Sun Apr 05 23:05:55 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:05:57 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:05:58 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:05:59 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:00 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:00 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:02 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:03 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:08 2020] [error] [client 114.119.166.138] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:32 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:06:33 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:07:20 2020] [error] [client xx.xx.xx.xx] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/favicon.ico, referer: http://mywebsite.co.uk/admin/index.php
[Sun Apr 05 23:07:50 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:07:50 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:12:10 2020] [error] [client 114.119.166.138] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:12:34 2020] [error] [client 216.244.66.246] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:02 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:03 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:04 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:06 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:07 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:07 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:10 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:14 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:25 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:13:41 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:13:41 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:13:43 2020] [error] [client xx.xx.xx.xx] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/favicon.ico, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:13:49 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:13:49 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:18:17 2020] [error] [client 114.119.160.188] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:19:54 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:20:28 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:23:09 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:24:12 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:25:46 2020] [error] [client xx.xx.xx.xx] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/robots.txt
[Sun Apr 05 23:27:44 2020] [error] [client xx.xx.xx.xx] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/sitemap.xml
[Sun Apr 05 23:27:45 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:30:09 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:36:08 2020] [error] [client 114.119.162.36] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:42:05 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:46:35 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:48:03 2020] [error] [client 114.119.166.138] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:54:06 2020] [error] [client 114.119.161.59] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Sun Apr 05 23:56:44 2020] [error] [client 95.163.255.6] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/robots.txt
[Sun Apr 05 23:57:23 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:57:23 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Sun Apr 05 23:57:32 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:00:02 2020] [error] [client 114.119.166.138] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:05:59 2020] [error] [client 114.119.162.36] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:09:46 2020] [error] [client 46.229.168.154] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/robots.txt
[Mon Apr 06 00:09:47 2020] [error] [client 46.229.168.142] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/creating-an-outline-for-a-research-paper-powerpoint
[Mon Apr 06 00:11:54 2020] [error] [client 114.119.160.188] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:13:09 2020] [error] [client 95.163.255.56] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/robots.txt
[Mon Apr 06 00:17:50 2020] [error] [client 114.119.161.124] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:23:46 2020] [error] [client 114.119.161.59] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:29:42 2020] [error] [client 114.119.161.59] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:35:44 2020] [error] [client 114.119.166.138] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:37:03 2020] [error] [client 66.249.64.162] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:38:43 2020] [error] [client 216.244.66.246] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/writing-research-papers-theses
[Mon Apr 06 00:41:40 2020] [error] [client 114.119.161.59] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:47:31 2020] [error] [client 114.119.162.134] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:53:19 2020] [error] [client 114.119.166.138] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:55:48 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 00:59:13 2020] [error] [client 114.119.162.134] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 01:04:55 2020] [error] [client 66.249.64.162] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 01:05:05 2020] [error] [client 114.119.161.124] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 01:09:32 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 01:10:08 2020] [error] [client 66.249.64.165] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 01:11:00 2020] [error] [client 114.119.162.134] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 01:11:29 2020] [error] [client 66.249.64.165] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 01:16:55 2020] [error] [client 114.119.162.134] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 01:22:51 2020] [error] [client 114.119.160.188] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 01:23:27 2020] [error] [client 216.244.66.246] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/how-to-do-conclusions-for-research-papers
[Mon Apr 06 01:28:36 2020] [error] [client 114.119.166.57] PHP Fatal error:  Cannot redeclare class hooks in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/includes/classes/hooks.php on line 13
[Mon Apr 06 01:29:06 2020] [error] [client 46.229.168.133] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/robots.txt
[Mon Apr 06 01:29:07 2020] [error] [client 46.229.168.131] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/type-my-journalism-research-paper
[Mon Apr 06 01:37:38 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:38 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:44 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:44 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:45 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:45 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:46 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:46 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:47 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:47 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:48 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:48 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:37:55 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17
[Mon Apr 06 01:37:55 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17
[Mon Apr 06 01:38:57 2020] [error] [client 91.242.162.49] File does not exist: /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/robots.txt
[Mon Apr 06 01:41:56 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17
[Mon Apr 06 01:41:56 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17
[Mon Apr 06 01:41:57 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17
[Mon Apr 06 01:41:57 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17
[Mon Apr 06 01:42:08 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:42:08 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:49:38 2020] [error] [client xx.xx.xx.xx] PHP Warning:  require(DIR_WS_INCLUDEStemplate_top.php): failed to open stream: No such file or directory in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php
[Mon Apr 06 01:49:38 2020] [error] [client xx.xx.xx.xx] PHP Fatal error:  require(): Failed opening required 'DIR_WS_INCLUDEStemplate_top.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/vhosts/mywebsite/mywebsite.co.uk/httpdocs/admin/modules_hooks.php on line 17, referer: http://mywebsite.co.uk/admin/administrators.php

 

Link to comment
Share on other sites

 Please check,    includes/application_top.php

<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2014 osCommerce

  Released under the GNU General Public License
*/

// start the timer for the page parse time log
  define('PAGE_PARSE_START_TIME', microtime());

// set the level of error reporting
  error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT);

// check support for register_globals
  if (function_exists('ini_get') && (ini_get('register_globals') == false) && (PHP_VERSION < 4.3) ) {
    exit('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory. Please use PHP 4.3+ if register_globals cannot be enabled on the server.');
  }

// load server configuration parameters
  if (file_exists('includes/local/configure.php')) { // for developers
    include('includes/local/configure.php');
  } else {
    include('includes/configure.php');
  }

  if (DB_SERVER == '') {
    if (is_dir('install')) {
      header('Location: install/index.php');
      exit;
    }
  }

// define the project version --- obsolete, now retrieved with tep_get_version()
  define('PROJECT_VERSION', 'osCommerce Online Merchant v2.3');

// some code to solve compatibility issues
  require('includes/functions/compatibility.php');

// set the type of request (secure or not)
  $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

// set php_self in the local scope
  $req = parse_url($_SERVER['SCRIPT_NAME']);
  $PHP_SELF = substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG));

  if ($request_type == 'NONSSL') {
    define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
  } else {
    define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
  }

// include the list of project database tables
  require('includes/database_tables.php');

// include the database functions
  require('includes/functions/database.php');

// make a connection to the database... now
  tep_db_connect() or die('Unable to connect to database server!');

// set the application parameters
  $configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
  while ($configuration = tep_db_fetch_array($configuration_query)) {
    define($configuration['cfgKey'], $configuration['cfgValue']);
  }

// if gzip_compression is enabled, start to buffer the output
  if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && !headers_sent() ) {
    if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {
      if (PHP_VERSION < '5.4' || PHP_VERSION > '5.4.5') { // see PHP bug 55544
        if (PHP_VERSION >= '4.0.4') {
          ob_start('ob_gzhandler');
        } elseif (PHP_VERSION >= '4.0.1') {
          include('includes/functions/gzip_compression.php');
          ob_start();
          ob_implicit_flush();
        }
      }
    } elseif (function_exists('ini_set')) {
      ini_set('zlib.output_compression_level', GZIP_LEVEL);
    }
  }

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
  if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
    if (strlen(getenv('PATH_INFO')) > 1) {
      $GET_array = array();
      $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
      $vars = explode('/', substr(getenv('PATH_INFO'), 1));
      do_magic_quotes_gpc($vars);
      $n=sizeof($vars);
      for ($i=0; $i<$n; $i++) {
        if (strpos($vars[$i], '[]')) {
          $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
        } else {
          $_GET[$vars[$i]] = $vars[$i+1];
        }
        $i++;
      }

      if ($GET_array !== null) {
        foreach($GET_array as $key => $value) {
          $_GET[$key] = $value;
        }
      }
    }
  }

// define general functions used application-wide
  require('includes/functions/general.php');
  require('includes/functions/html_output.php');
 
// hooks
  require('includes/classes/hooks.php');
  $OSCOM_Hooks = new hooks('shop');

// set the cookie domain
  $cookie_domain = (($request_type == 'NONSSL') ? HTTP_COOKIE_DOMAIN : HTTPS_COOKIE_DOMAIN);
  $cookie_path = (($request_type == 'NONSSL') ? HTTP_COOKIE_PATH : HTTPS_COOKIE_PATH);

// include cache functions if enabled
  if (USE_CACHE == 'true') include('includes/functions/cache.php');

// include shopping cart class
  require('includes/classes/shopping_cart.php');

// include navigation history class
  require('includes/classes/navigation_history.php');

// define how the session functions will be used
  require('includes/functions/sessions.php');

// set the session name and save path
  tep_session_name('osCsid');
  tep_session_save_path(SESSION_WRITE_DIRECTORY);

// set the session cookie parameters
   if (function_exists('session_set_cookie_params')) {
    session_set_cookie_params(0, $cookie_path, $cookie_domain);
  } elseif (function_exists('ini_set')) {
    ini_set('session.cookie_lifetime', '0');
    ini_set('session.cookie_path', $cookie_path);
    ini_set('session.cookie_domain', $cookie_domain);
  }

  @ini_set('session.use_only_cookies', (SESSION_FORCE_COOKIE_USE == 'True') ? 1 : 0);

// set the session ID if it exists
  if ( SESSION_FORCE_COOKIE_USE == 'False' ) {
    if ( isset($_GET[tep_session_name()]) && (!isset($_COOKIE[tep_session_name()]) || ($_COOKIE[tep_session_name()] != $_GET[tep_session_name()])) ) {
      tep_session_id($_GET[tep_session_name()]);
    } elseif ( isset($_POST[tep_session_name()]) && (!isset($_COOKIE[tep_session_name()]) || ($_COOKIE[tep_session_name()] != $_POST[tep_session_name()])) ) {
      tep_session_id($_POST[tep_session_name()]);
    }
  }

// start the session
  $session_started = false;
  if (SESSION_FORCE_COOKIE_USE == 'True') {
    tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, $cookie_path, $cookie_domain);

    if (isset($_COOKIE['cookie_test'])) {
      tep_session_start();
      $session_started = true;
    }
  } elseif (SESSION_BLOCK_SPIDERS == 'True') {
    $user_agent = strtolower(getenv('HTTP_USER_AGENT'));
    $spider_flag = false;

    if (tep_not_null($user_agent)) {
      $spiders = file('includes/spiders.txt');

      $n=sizeof($spiders);
      for ($i=0; $i<$n; $i++) {
        if (tep_not_null($spiders[$i])) {
          if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
            $spider_flag = true;
            break;
          }
        }
      }
    }

    if ($spider_flag == false) {
      tep_session_start();
      $session_started = true;
    }
  } else {
    tep_session_start();
    $session_started = true;
  }

  if ( ($session_started == true) && (PHP_VERSION >= 4.3) && function_exists('ini_get') && (ini_get('register_globals') == false) ) {
    extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS);
  }

// initialize a session token
  if (!tep_session_is_registered('sessiontoken')) {
    $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand());
    tep_session_register('sessiontoken');
  }

// set SID once, even if empty
  $SID = (defined('SID') ? SID : '');

// verify the ssl_session_id if the feature is enabled
  if ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && (ENABLE_SSL == true) && ($session_started == true) ) {
    $ssl_session_id = getenv('SSL_SESSION_ID');
    if (!tep_session_is_registered('SSL_SESSION_ID')) {
      $SESSION_SSL_ID = $ssl_session_id;
      tep_session_register('SESSION_SSL_ID');
    }

    if ($SESSION_SSL_ID != $ssl_session_id) {
      tep_session_destroy();
      tep_redirect(tep_href_link('ssl_check.php'));
    }
  }

// verify the browser user agent if the feature is enabled
  if (SESSION_CHECK_USER_AGENT == 'True') {
    $http_user_agent = getenv('HTTP_USER_AGENT');
    if (!tep_session_is_registered('SESSION_USER_AGENT')) {
      $SESSION_USER_AGENT = $http_user_agent;
      tep_session_register('SESSION_USER_AGENT');
    }

    if ($SESSION_USER_AGENT != $http_user_agent) {
      tep_session_destroy();
      tep_redirect(tep_href_link('login.php'));
    }
  }

// verify the IP address if the feature is enabled
  if (SESSION_CHECK_IP_ADDRESS == 'True') {
    $ip_address = tep_get_ip_address();
    if (!tep_session_is_registered('SESSION_IP_ADDRESS')) {
      $SESSION_IP_ADDRESS = $ip_address;
      tep_session_register('SESSION_IP_ADDRESS');
    }

    if ($SESSION_IP_ADDRESS != $ip_address) {
      tep_session_destroy();
      tep_redirect(tep_href_link('login.php'));
    }
  }

// create the shopping cart
  if (!tep_session_is_registered('cart') || !is_object($cart)) {
    tep_session_register('cart');
    $cart = new shoppingCart;
  }

// include currencies class and create an instance
  require('includes/classes/currencies.php');
  $currencies = new currencies();

// include the mail classes
  require('includes/classes/mime.php');
  require('includes/classes/email.php');

// set the language
  if (!tep_session_is_registered('language') || isset($_GET['language'])) {
    if (!tep_session_is_registered('language')) {
      tep_session_register('language');
      tep_session_register('languages_id');
    }

    include('includes/classes/language.php');
    $lng = new language();

    if (isset($_GET['language']) && tep_not_null($_GET['language'])) {
      $lng->set_language($_GET['language']);
    } else {
      $lng->get_browser_language();
    }

    $language = $lng->language['directory'];
    $languages_id = $lng->language['id'];
  }

// include the language translations
  $_system_locale_numeric = setlocale(LC_NUMERIC, 0);
  require('includes/languages/' . $language . '.php');
  setlocale(LC_NUMERIC, $_system_locale_numeric); // Prevent LC_ALL from setting LC_NUMERIC to a locale with 1,0 float/decimal values instead of 1.0 (see bug #634)

// currency
  if (!tep_session_is_registered('currency') || isset($_GET['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {
    if (!tep_session_is_registered('currency')) tep_session_register('currency');

    if (isset($_GET['currency']) && $currencies->is_set($_GET['currency'])) {
      $currency = $_GET['currency'];
    } else {
      $currency = ((USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && $currencies->is_set(LANGUAGE_CURRENCY)) ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
    }
  }

// navigation history
  if (!tep_session_is_registered('navigation') || !is_object($navigation)) {
    tep_session_register('navigation');
    $navigation = new navigationHistory;
  }
  $navigation->add_current_page();

// action recorder
  include('includes/classes/action_recorder.php');
// initialize the message stack for output messages
  require('includes/classes/alertbox.php');
  require('includes/classes/message_stack.php');
  $messageStack = new messageStack;

// Shopping cart actions
  if (isset($_GET['action'])) {
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
    if ($session_started == false) {
      tep_redirect(tep_href_link('cookie_usage.php'));
    }

    if (DISPLAY_CART == 'true') {
      $goto = 'shopping_cart.php';
      $parameters = array('action', 'cPath', 'products_id', 'pid');
    } else {
      $goto = $PHP_SELF;
      if ($_GET['action'] == 'buy_now') {
        $parameters = array('action', 'pid', 'products_id');
      } else {
        $parameters = array('action', 'pid');
      }
    }
    
    include('includes/classes/actions.php');
        osC_Actions::parse($_GET['action']);
    
  }

// include the who's online functions
  require('includes/functions/whos_online.php');
  tep_update_whos_online();

// include the password crypto functions
  require('includes/functions/password_funcs.php');

// include validation functions (right now only email address)
  require('includes/functions/validations.php');

// split-page-results
  require('includes/classes/split_page_results.php');

// auto activate and expire banners
  require('includes/functions/banner.php');
  tep_activate_banners();
  tep_expire_banners();

// auto expire special products
  require('includes/functions/specials.php');
  tep_expire_specials();

  require('includes/classes/osc_template.php');
  $oscTemplate = new oscTemplate();

// include category tree class
  require('includes/classes/category_tree.php');

// calculate category path
  if (isset($_GET['cPath'])) {
    $cPath = $_GET['cPath'];
  } elseif (isset($_GET['products_id']) && !isset($_GET['manufacturers_id'])) {
    $cPath = tep_get_product_path($_GET['products_id']);
  } else {
    $cPath = '';
  }

  if (tep_not_null($cPath)) {
    $cPath_array = tep_parse_category_path($cPath);
    $cPath = implode('_', $cPath_array);
    $current_category_id = end($cPath_array);
    
    $OSCOM_category = new category_tree;
  } else {
    $current_category_id = 0;
  }

// include the breadcrumb class and start the breadcrumb trail
  require('includes/classes/breadcrumb.php');
  $breadcrumb = new breadcrumb;

  $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);
  $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link('index.php'));

// add category names or the manufacturer name to the breadcrumb trail
  if (isset($cPath_array)) {
    foreach ($cPath_array as $k => $v) {
      $breadcrumb_category = $OSCOM_category->getData($v, 'name');
    
      if ( defined('MODULE_HEADER_TAGS_CATEGORY_TITLE_SEO_BREADCRUMB_OVERRIDE') && (MODULE_HEADER_TAGS_CATEGORY_TITLE_SEO_BREADCRUMB_OVERRIDE == 'True') ) {
        if (tep_not_null($OSCOM_category->getData($v, 'seo_title'))) {
          $breadcrumb_category = $OSCOM_category->getData($v, 'seo_title');
        }
      }  

      $breadcrumb->add($breadcrumb_category, tep_href_link('index.php', 'cPath=' . implode('_', array_slice($cPath_array, 0, ($k+1)))));
    }
  } elseif (isset($_GET['manufacturers_id'])) {
    if ( defined('MODULE_HEADER_TAGS_MANUFACTURER_TITLE_SEO_BREADCRUMB_OVERRIDE') && (MODULE_HEADER_TAGS_MANUFACTURER_TITLE_SEO_BREADCRUMB_OVERRIDE == 'True') ) {
      $manufacturers_query = tep_db_query("select coalesce(NULLIF(mi.manufacturers_seo_title, ''), m.manufacturers_name) as manufacturers_name from manufacturers m, manufacturers_info mi where m.manufacturers_id = mi.manufacturers_id and m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "'");
    }
    else {
      $manufacturers_query = tep_db_query("select manufacturers_name from manufacturers where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'");
    }
    if (tep_db_num_rows($manufacturers_query)) {
      $manufacturers = tep_db_fetch_array($manufacturers_query);
      $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link('index.php', 'manufacturers_id=' . $_GET['manufacturers_id']));
    }
  }

// add the products model to the breadcrumb trail
  if (isset($_GET['products_id'])) {    
    if ( defined('MODULE_HEADER_TAGS_PRODUCT_TITLE_SEO_BREADCRUMB_OVERRIDE') && (MODULE_HEADER_TAGS_PRODUCT_TITLE_SEO_BREADCRUMB_OVERRIDE == 'True') ) {
      $model_query = tep_db_query("select coalesce(NULLIF(pd.products_seo_title, ''), NULLIF(p.products_model, ''), pd.products_name) as products_model from products p, products_description pd where p.products_id = '" . (int)$_GET['products_id'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
    }
    else {
      $model_query = tep_db_query("select coalesce(NULLIF(p.products_model, ''), pd.products_name) as products_model from products p, products_description pd where p.products_id = '" . (int)$_GET['products_id'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'");
    }
    if (tep_db_num_rows($model_query)) {
      $model = tep_db_fetch_array($model_query);
      $breadcrumb->add($model['products_model'], tep_href_link('product_info.php', 'cPath=' . $cPath . '&products_id=' . $_GET['products_id']));
    }
  }

  $OSCOM_Hooks->register(basename($PHP_SELF, '.php'));

 


 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...