| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
need to add this to the home.php | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I need to add this to the home.php can anybody help
<?php require("stats/spider_trap.php"); ?> it for a stats program that i would like to run i have tried to add it but just get errors i tried include but errors like below I get this error at the bottom of the page (when I try to include the require function directly in the PHP code): INVALID SQL: 1046 : No Database Selected SQL QUERY FAILURE: UPDATE xcart_sessions_data SET data='a:24:{s:11:\"editor_mode\";s:0:\"\";s:8:\"is _robot\";s:1:\"N\";s:5:\"robot\";s:0:\"\";s:11:\"i s_location\";s:1:\"Y\";s:9:\"adaptives\";a:12:{s:4 :\"isJS\";s:1:\"Y\";s:5:\"isDOM\";s:1:\"Y\";s:8:\" isStrict\";s:0:\"\";s:6:\"isJava\";s:1:\"Y\";s:7:\ "browser\";s:4:\"MSIE\";s:7:\"version\";s:3:\"6.0\ ";s:8:\"platform\";s:5:\"Win32\";s:8:\"isCookie\"; s:1:\"Y\";s:8:\"screen_x\";s:4:\"1280\";s:8:\"scre en_y\";s:4:\"1024\";s:7:\"plugins\";a:1:{i:0;s:0:\ "\";}s:14:\"is_first_start\";s:0:\"\";}s:26:\"sess ion_failed_transaction\";s:0:\"\";s:16:\"add_to_ca rt_time\";s:0:\"\";s:17:\"always_allow_shop\";s:0: \"\";s:16:\"current_url_page\";s:37:\"https://www.towbar.biz/home.php?cat=0\";s:12:\"current_date\";i:110304513 9;s:19:\"session_create_date\";i:1103045135;s:4:\" wlid\";s:0:\"\";s:10:\"js_enabled\";s:1:\"Y\";s:11 :\"top_message\";s:0:\"\";s:15:\"referer_session\" ;s:30:\"https://www.towbar.biz/stats2/\";s:5:\"login\";s:0:\"\";s:10:\"login_type\";s:0: \"\";s:6:\"logged\";s:0:\"\";s:4:\"cart\";s:0:\"\" ;s:12:\"stats_pageid\";s:1:\"2\";s:15:\"stats_page _time\";i:1103045139;s:18:\"stats_pages_string\";s :1:\"2\";s:19:\"stats_transactionid\";s:0:\"\";s:2 2:\"stats_transaction_step\";s:0:\"\";}' WHERE sessid='82c33cb805380e6f658161d1fe3492e3' Which means that the xcart script, you have managing your site, is trying to save the session info into a database but encounters problems when it is trying to save that information, which it does not understand. In a real world this should not happen. It should work independently and save only what it creates but this is not your case. runnig 4.0.8
__________________
andy X cart 5 ver 5.0.14 PHP: 5.3.2-1ubuntu4.24 details >> MySQL server: 5.1.67-0ubuntu0.10.04.1 (InnoDB engine support enabled) Web server: Apache Operating system: Linux XML parser: found GDLib: found (2.0) Translation driver: Database Curl version: 7.19.7 |
|||||||
#2
|
|||||||
|
|||||||
![]() Try:
Code:
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#3
|
|||||||
|
|||||||
![]() Quote:
No just got a error
__________________
andy X cart 5 ver 5.0.14 PHP: 5.3.2-1ubuntu4.24 details >> MySQL server: 5.1.67-0ubuntu0.10.04.1 (InnoDB engine support enabled) Web server: Apache Operating system: Linux XML parser: found GDLib: found (2.0) Translation driver: Database Curl version: 7.19.7 |
|||||||
#4
|
|||||||
|
|||||||
![]() and the error is exactly?
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#5
|
|||||||
|
|||||||
![]() Quote:
Parse error: parse error, unexpected T_REQUIRE in /usr/local/etc/httpd/sites/towbar.biz/htdocs/home.php on line 44 include "stat2/spider_trap.php" not like "=" or the {} Hope this helps
__________________
andy X cart 5 ver 5.0.14 PHP: 5.3.2-1ubuntu4.24 details >> MySQL server: 5.1.67-0ubuntu0.10.04.1 (InnoDB engine support enabled) Web server: Apache Operating system: Linux XML parser: found GDLib: found (2.0) Translation driver: Database Curl version: 7.19.7 |
|||||||
#6
|
|||||||
|
|||||||
![]() Sorry, I just realised you were tying to add the code to the home.php file and no the tpl file.
You could try to add the following... right before the last ?> in home.php Quote:
__________________
Emerson █ Total Server Solutions LLC- Quality X-Cart Hosting █ Recommended X-Cart Hosting Provider - US and UK servers █ Does your host backup your site? We do EVERY HOUR!!! █ Shared Hosting | Managed Cloud | Dedicated Servers |
|||||||
#7
|
|||||||
|
|||||||
![]() Quote:
the error at the bottom of the page INVALID SQL: 1046 : No Database Selected SQL QUERY FAILURE: UPDATE xcart_sessions_data SET data='a:24:{s:11:\"editor_mode\";s:0:\"\";s:8:\"is _robot\";s:1:\"N\";s:5:\"robot\";s:0:\"\";s:11:\"i s_location\";s:1:\"Y\";s:9:\"adaptives\";a:12:{s:4 :\"isJS\";s:1:\"Y\";s:5:\"isDOM\";s:1:\"Y\";s:8:\" isStrict\";s:0:\"\";s:6:\"isJava\";s:1:\"Y\";s:7:\ "browser\";s:4:\"MSIE\";s:7:\"version\";s:3:\"6.0\ ";s:8:\"platform\";s:5:\"Win32\";s:8:\"isCookie\"; s:1:\"Y\";s:8:\"screen_x\";s:4:\"1024\";s:8:\"scre en_y\";s:3:\"768\";s:7:\"plugins\";a:1:{i:0;s:0:\" \";}s:14:\"is_first_start\";s:0:\"\";}s:26:\"sessi on_failed_transaction\";s:0:\"\";s:16:\"add_to_car t_time\";s:0:\"\";s:17:\"always_allow_shop\";s:0:\ "\";s:16:\"current_url_page\";s:30:\"http://www.towbar.biz/home.php\";s:12:\"current_date\";i:1103060850;s:19 :\"session_create_date\";i:1103055841;s:4:\"wlid\" ;s:0:\"\";s:10:\"js_enabled\";s:1:\"Y\";s:11:\"top _message\";s:0:\"\";s:15:\"referer_session\";s:69: \"XXXX:+++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++\";s:5:\"login\";s:0:\"\";s:1 0:\"login_type\";s:0:\"\";s:6:\"logged\";s:0:\"\"; s:4:\"cart\";s:0:\"\";s:12:\"stats_pageid\";s:1:\" 1\";s:15:\"stats_page_time\";i:1103060850;s:18:\"s tats_pages_string\";s:3:\"2-1\";s:19:\"stats_transactionid\";s:0:\"\";s:22:\"s tats_transaction_step\";s:0:\"\";}' WHERE sessid='2d95166696be309213a0593436f34e04'
__________________
andy X cart 5 ver 5.0.14 PHP: 5.3.2-1ubuntu4.24 details >> MySQL server: 5.1.67-0ubuntu0.10.04.1 (InnoDB engine support enabled) Web server: Apache Operating system: Linux XML parser: found GDLib: found (2.0) Translation driver: Database Curl version: 7.19.7 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|