marcusg Posted January 1, 2010 Share Posted January 1, 2010 I made a copy of my shop: copied public_html to test_html and created a vhost, and made a copy of all database-tables and copied them back with another prefix (ps2 instead of ps2). I want to have a testshop to try modifications and have selected people try them out before I release them to the public.The problem is, I get a "Hack attempt" error. The menu displays fine, but it fails when trying to display a product in some way (featured products, list of products, product pages...). Anyone got an idea why this happens? Link to comment Share on other sites More sharing options...
badger1010 Posted January 8, 2010 Share Posted January 8, 2010 I have the same problem.Site was working fine, after adding some products, attempted to view them and got 'Hack attempt'.At first I was able to view some products but now, there is nothing viewable, none of the site at all, just the message 'Hack attempt'.I am still able to log in to the admin section.Is anyone able to give some idea of what causes this and more importantly, what is the remedy?Grateful for any assistance. Link to comment Share on other sites More sharing options...
KIH999 Posted January 8, 2010 Share Posted January 8, 2010 Did you remember to edit settings.inc.php in config-folder for your second copy to reflect changes in: _DB_PREFIX_ _DB_SERVER___PS_BASE_URI__?The "Hack attemt" is not easy to trace back, it is the default errormessage..(When programmers don't pass parameters to "die(Tools::displayError());") Link to comment Share on other sites More sharing options...
badger1010 Posted January 8, 2010 Share Posted January 8, 2010 Thanks for the reply.I've fixed it by reinstalling, but I don't want to do that too often.Would be good to know what caused it so I can try and avoid it happening again. Link to comment Share on other sites More sharing options...
marcusg Posted January 11, 2010 Author Share Posted January 11, 2010 Did you remember to edit settings.inc.php in config-folder for your second copy to reflect changes in: _DB_PREFIX_ _DB_SERVER___PS_BASE_URI__?The "Hack attemt" is not easy to trace back, it is the default errormessage..(When programmers don't pass parameters to "die(Tools::displayError());") Yes, I've changed those settings. When I looked at the backoffice, I see the categories in the Catalog, but where the products should be it says 'Hack attempt'.I also noticed that all settings seems to be blank! When I went to Preferences, all was emty. Why is it like this? Could it be that something went wrong when importing the db? I opened a backup dump of the db from the main shop and ran a search-and-replace 'ps_' to 'ps2_' to change the prefix for all tables. May this have changed more than just the table-prefixes?I could make a fresh install on the test-site, but then I'd need to install all changes that I've made (new theme, new modules, changes to existing modules, changes to various .php and .tpl-files...). So I really would like to be able to just make a copy of the main site from time to time: both the folder and the db... Link to comment Share on other sites More sharing options...
VladoZem Posted January 30, 2010 Share Posted January 30, 2010 I created about 5 products manualy through back office.So in my prestashop there were defaults products from default instalation plus 5 products what I created through back office.Then I used exportproducts module to export data from my webshop.So i downloaded "products.csv" into my desktop.When I opened this .csv file I have seen how prestashop put products into database.Then I modify "product.csv and add about 50 products into "product.csv" throug OpenOffice.Then I upload this file to ftp server into admin folderWhen I import products.csv through back office it shows me hack attempt.I don t understand that because I add those 50 products into products.csv using exactly the way how prestashop generate.Does anybody have same problem?I thing this is bug.Or how do you guys importing big volume of products into prestashop? I hope you do not add each product via back office. Link to comment Share on other sites More sharing options...
Eck! Posted February 9, 2010 Share Posted February 9, 2010 This is usually caused by having no default category defined. If you can navigate to the product OK through the categories menu, but not via any other side boxes, check your default category for the product.You can also bypass in PHP if you prefer, open product.php, round about line 180, look for this line: $smarty->assign(array( 'return_link' => (isset($category->id) AND $category->id) ? Tools::safeOutput($link->getCategoryLink($category)) : '[removed] history.back();', 'path' => ((isset($category->id) AND $category->id) ? Tools::getFullPath(intval($category->id), $product->name) : Tools::getFullPath(intval($product->id_default_category), $product->name)) )); And change the last bit to... $smarty->assign(array( 'return_link' => (isset($category->id) AND $category->id) ? Tools::safeOutput($link->getCategoryLink($category)) : '[removed] history.back();', 'path' => ((isset($category->id) AND $category->id) ? Tools::getFullPath(intval($category->id), $product->name) : $product->name) )); The only thing this affects is the breadcrumb trail in the product page, it doesnt display the default category in the breadcrumb trail (because there isnt one!). Link to comment Share on other sites More sharing options...
Federico Gomez Posted February 11, 2010 Share Posted February 11, 2010 Hello, i remove all my categories but the Home category, also i remove all products and manufacturers. and when i try to import my products via CSV it came out the message Hack Attempt.how can i solve this? in the CSV can i set the default category? in the categories column on my csv i put: "Home, category2, category3"thanks Link to comment Share on other sites More sharing options...
VladoZem Posted February 11, 2010 Share Posted February 11, 2010 try what eck! wrote do you have dreamwever? u can edit and change every .php file with dreamweaver Link to comment Share on other sites More sharing options...
Recommended Posts