Saturday, 25 March 2017

List of mime types - config_file_mime_allowed for opencart


config_file_mime_allowed - useful when they are missing in your opencart installation/upgrade!



text/plain
image/png
image/jpeg
image/gif
image/bmp
image/tiff
image/svg+xml
application/zip
"application/zip"
application/x-zip
"application/x-zip"
application/x-zip-compressed
"application/x-zip-compressed"
application/rar
"application/rar"
application/x-rar
"application/x-rar"
application/x-rar-compressed
"application/x-rar-compressed"
application/octet-stream
"application/octet-stream"
audio/mpeg
video/quicktime
application/pdf






List of the robots and crawlers for opencart - config_robots


config_robots - useful when they are missing in your installation or upgrade.




abot
dbot
ebot
hbot
kbot
lbot
mbot
nbot
obot
pbot
rbot
sbot
tbot
vbot
ybot
zbot
bot.
bot/
_bot
.bot
/bot
-bot
:bot
(bot
crawl
slurp
spider
seek
accoona
acoon
adressendeutschland
ah-ha.com
ahoy
altavista
ananzi
anthill
appie
arachnophilia
arale
araneo
aranha
architext
aretha
arks
asterias
atlocal
atn
atomz
augurfind
backrub
bannana_bot
baypup
bdfetch
big brother
biglotron
bjaaland
blackwidow
blaiz
blog
blo.
bloodhound
boitho
booch
bradley
butterfly
calif
cassandra
ccubee
cfetch
charlotte
churl
cienciaficcion
cmc
collective
comagent
combine
computingsite
csci
curl
cusco
daumoa
deepindex
delorie
depspid
deweb
die blinde kuh
digger
ditto
dmoz
docomo
download express
dtaagent
dwcp
ebiness
ebingbong
e-collector
ejupiter
emacs-w3 search engine
esther
evliya celebi
ezresult
falcon
felix ide
ferret
fetchrover
fido
findlinks
fireball
fish search
fouineur
funnelweb
gazz
gcreep
genieknows
getterroboplus
geturl
glx
goforit
golem
grabber
grapnel
gralon
griffon
gromit
grub
gulliver
hamahakki
harvest
havindex
helix
heritrix
hku www octopus
homerweb
htdig
html index
html_analyzer
htmlgobble
hubater
hyper-decontextualizer
ia_archiver
ibm_planetwide
ichiro
iconsurf
iltrovatore
image.kapsi.net
imagelock
incywincy
indexer
infobee
informant
ingrid
inktomisearch.com
inspector web
intelliagent
internet shinchakubin
ip3000
iron33
israeli-search
ivia
jack
jakarta
javabee
jetbot
jumpstation
katipo
kdd-explorer
kilroy
knowledge
kototoi
kretrieve
labelgrabber
lachesis
larbin
legs
libwww
linkalarm
link validator
linkscan
lockon
lwp
lycos
magpie
mantraagent
mapoftheinternet
marvin/
mattie
mediafox
mediapartners
mercator
merzscope
microsoft url control
minirank
miva
mj12
mnogosearch
moget
monster
moose
motor
multitext
muncher
muscatferret
mwd.search
myweb
najdi
nameprotect
nationaldirectory
nazilla
ncsa beta
nec-meshexplorer
nederland.zoek
netcarta webmap engine
netmechanic
netresearchserver
netscoop
newscan-online
nhse
nokia6682/
nomad
noyona
nutch
nzexplorer
objectssearch
occam
omni
open text
openfind
openintelligencedata
orb search
osis-project
pack rat
pageboy
pagebull
page_verifier
panscient
parasite
partnersite
patric
pear.
pegasus
peregrinator
pgp key agent
phantom
phpdig
picosearch
piltdownman
pimptrain
pinpoint
pioneer
piranha
plumtreewebaccessor
pogodak
poirot
pompos
poppelsdorf
poppi
popular iconoclast
psycheclone
publisher
python
rambler
raven search
roach
road runner
roadhouse
robbie
robofox
robozilla
rules
salty
sbider
scooter
scoutjet
scrubby
search.
searchprocess
semanticdiscovery
senrigan
sg-scout
shai'hulud
shark
shopwiki
sidewinder
sift
silk
simmany
site searcher
site valet
sitetech-rover
skymob.com
sleek
smartwit
sna-
snappy
snooper
sohu
speedfind
sphere
sphider
spinner
spyder
steeler/
suke
suntek
supersnooper
surfnomore
sven
sygol
szukacz
tach black widow
tarantula
templeton
/teoma
t-h-u-n-d-e-r-s-t-o-n-e
theophrastus
titan
titin
tkwww
toutatis
t-rex
tutorgig
twiceler
twisted
ucsd
udmsearch
url check
updated
vagabondo
valkyrie
verticrawl
victoria
vision-search
volcano
voyager/
voyager-hc
w3c_validator
w3m2
w3mir
walker
wallpaper
wanderer
wauuu
wavefire
web core
web hopper
web wombat
webbandit
webcatcher
webcopy
webfoot
weblayers
weblinker
weblog monitor
webmirror
webmonkey
webquest
webreaper
websitepulse
websnarf
webstolperer
webvac
webwalk
webwatch
webwombat
webzinger
whizbang
whowhere
wild ferret
worldlight
wwwc
wwwster
xenu
xget
xift
xirq
yandex
yanga
yeti
yodao
zao
zippp
zyborg





Thursday, 23 March 2017

enable/disable php errors via htaccess


How to enable the php display error via htaccess

 Add in your htaccess:

php_flag display_errors on
php_flag html_errors on



How to show php errors without notices via htaccess

Add in your htaccess:

php_value error_reporting 2039




Monday, 20 March 2017

simple batch script to import sql file in mysql










 
@echo off
SET mysqldir=C:\mysql\bin
SET mysqlhost=localhost
SET mysqldatabase=dbname
SET mysqluser=user
SET mysqlpassword=password

if [%1]==[] goto usage

IF NOT EXIST %1 GOTO nosuchfile

@REM Change to mysqldir
REM CD %mysqldir%

@REM importing db
"%mysqldir%\mysql.exe" -u %mysqluser% -h%mysqlhost% -p%mysqlpassword% %mysqldatabase% < %1


pause
goto end


:usage
echo -How to use-
echo EXAMPLE:
echo %0 sqlfile.sql
goto end
:nosuchfile
echo --ERROR--
echo no such file %1

:end

Saturday, 18 March 2017

[SOLUTION] Opencart 1.5.6.4 - from mysql to mysqli

Just edit your
"config.php" and "admin/config.php"

and redefine the DB_DRIVER as follows:

define('DB_DRIVER', 'mysqli');

[FIX] opencart - Add the previously deleted english language

If you have previously deleted (in general not suggested) the English language supposing to solve the problem to have just one language in the backend you can try to add it again.

Run this sql query to add with ID 1.

INSERT INTO `oc_language` (`language_id`, `name`, `code`, `locale`, `image`, `directory`, `sort_order`, `status`) VALUES
(1, 'English', 'en', 'en_US.UTF-8,en_US,en-gb,english', 'gb.png', 'english', 1, 1);





Thursday, 16 March 2017

[solution] multiple collapse dropdown menu nav

Sometimes, with bootstrap, you need multiple collapsable Menus.


change the data-taget to an ID
example (mainmenu):
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#mainmenu">

use and ID for your navbar
example (mainmenu):
<div class="collapse navbar-collapse" id="mainmenu">


and do the same with all the other menus that you have with a different ID or a custom/different class.


Saturday, 11 March 2017

Delete rows where id does not have a match from another table.

 This simple sql query deletes the all the records that don't have a corresponding ID in another table.



#delete orphaned descriptions of the products
DELETE b FROM `oc_product_description` b LEFT JOIN `oc_product` a ON b.product_id = a.product_id WHERE a.product_id IS NULL



You can use it to delete orphaned product descriptions in opencart

Monday, 6 March 2017

Check for duplicate entries in the url aliases of opencart. Fix Subquery returns more than 1 row (products)

Check for duplicate entries  in the url aliases of opencart:


(same query keyword)
SELECT  `query`,`keyword`, COUNT(*) FROM  `oc_url_alias` GROUP BY  `query`, `keyword` HAVING COUNT(*) > 1


(same query) - Usually you can have errors related to the same queries
SELECT `query`, COUNT(*) FROM `oc_url_alias` GROUP BY `query` HAVING COUNT(*) > 1


(same keyword)
SELECT `keyword`, COUNT(*) FROM `oc_url_alias` GROUP BY `keyword` HAVING COUNT(*) > 1




Tip:
In most cases I fixed this error
Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row in system/library/db/mysqli.php on line 18Notice: Error: Subquery returns more than 1 row

by removing the orphaned entries/urlaliases (ex. the demo data).
Do a backup before removing anything.

Saturday, 4 March 2017

How to fix date(): It is not safe to rely on the system's timezone settings - php



When you use the date function sometimes, if there's no specific configuration, you will see this error:

date(): It is not safe to rely on the system's timezone settings

 

How to fix date(): It is not safe to rely on the system's timezone settings

Solution #1
configure date.timezone in your php.ini configuration file. If you have no access to php.ini check the 2nd Solution.

Solution #2
Use date_default_timezone_set() or ini_set() inside your <?php  code

Example:
date_default_timezone_set('Europe/Rome');


The complete list of the supported time zones can be found on http://php.net/manual/en/timezones.php

[FIX] InsecurePlatformWarning - You can upgrade to a newer version of Python to solve this



Sample error that can occurr:
_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning


To solve without wasting time just run:
pip install requests[security]


 

Friday, 3 March 2017

allowed extensions list - useful for opencart config_file_ext_allowed extensions

Useful list of allowed extensions for opencart config_file_ext_allowed extensions



zip
txt
png
jpe
jpeg
jpg
gif
bmp
ico
tiff
tif
svg
svgz
zip
rar
7z
msi
cab
mp3
mp4
vid
qt
mov
pdf
psd
ai
eps
ps
doc
xls
ppt
ods
odt

Twitter Delicious Facebook Digg Stumbleupon Favorites More