[Skip to main content](#vessel-content)

#   Could not connect to MySQL

##

- **[erickb](/forum/user/4069-erickb "View erickb's Profile")**
- [![erickb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4069-erickb "View erickb's Profile") Topic Author
- [ Offline](/forum/user/4069-erickb)

Less More

- Posts: 2705
- Thank you received: 74
-
-

10 years 7 months ago -  10 years 7 months ago [\#235124](#235124) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  *[Could not connect to MySQL](/forum/5-support-en-francais-french-support-/883553-could-not-connect-to-mysql#235124 "-- HikaShop version -- : 35 -- Joomla version -- : 261 -- Error-message(debug-mod must be tuned on) -- : Could not connect to MySQL  Bonjour  Mon site marche très bien en distant mais en local la page produit plante, tout marche sauf cette page, meme si je desactive toutes mes vues c equi fait que je ne quasiment plus faire de développement avec Hikashop en localhost  le debug donne ca et bien sur la connection a la base est bonne")* was created by *[erickb](/forum/user/4069-erickb "View erickb's Profile")*

-- HikaShop version -- : 35
-- Joomla version -- : 261
-- Error-message(debug-mod must be tuned on) -- : Could not connect to MySQL

Bonjour

Mon site marche très bien en distant mais en local la page produit plante, tout marche sauf cette page, meme si je desactive toutes mes vues
c equi fait que je ne quasiment plus faire de développement avec Hikashop en localhost

> La page recherchée ne peut être affichée.
>
> Une erreur est survenue pendant l'exécution de la requête.
>
> Vous ne pouvez pas visiter cette page car :
>
> bookmark/favori périmé
> une adresse erronée
> Un moteur de recherche possède un listing périmé pour ce site
> vous n'avez pas accès à cette page
> Aller à la page d'accueil

le debug donne ca et bien sur la connection a la base est bonne

> 0 Could not connect to MySQL.
> Call stack
> \# Function Location
> 1 JApplicationCms-&gt;execute() /www/sacapuce/index.php:49
> 2 JApplicationSite-&gt;doExecute() /www/sacapuce/libraries/cms/application/cms.php:257
> 3 JApplicationSite-&gt;dispatch() /www/sacapuce/libraries/cms/application/site.php:230
> 4 JComponentHelper::renderComponent() /www/sacapuce/libraries/cms/application/site.php:191
> 5 JComponentHelper::executeComponent() /www/sacapuce/libraries/cms/component/helper.php:380
> 6 require\_once() /www/sacapuce/libraries/cms/component/helper.php:405
> 7 hikashopController-&gt;execute() /www/sacapuce/components/com\_hikashop/hikashop.php:77
> 8 JControllerLegacy-&gt;execute() /www/sacapuce/administrator/components/com\_hikashop/helpers/helper.php:1629
> 9 hikashopController-&gt;show() /www/sacapuce/libraries/legacy/controller/legacy.php:728
> 10 hikashopController-&gt;display() /www/sacapuce/administrator/components/com\_hikashop/helpers/helper.php:1387
> 11 JControllerLegacy-&gt;display() /www/sacapuce/administrator/components/com\_hikashop/helpers/helper.php:1649
> 12 ProductViewProduct-&gt;display() /www/sacapuce/libraries/legacy/controller/legacy.php:690
> 13 ProductViewProduct-&gt;show() /www/sacapuce/components/com\_hikashop/views/product/view.html.php:37
> 14 hikashopProductClass-&gt;save() /www/sacapuce/components/com\_hikashop/views/product/view.html.php:1168
> 15 JEventDispatcher-&gt;trigger() /www/sacapuce/administrator/components/com\_hikashop/classes/product.php:1589
> 16 JEvent-&gt;update() /www/sacapuce/libraries/joomla/event/dispatcher.php:160
> 17 call\_user\_func\_array() /www/sacapuce/libraries/joomla/event/event.php:69
> 18 plgHikashopFieldcategory-&gt;onAfterProductUpdate()
> 19 plgHikashopFieldcategory-&gt;\_AfterProduct() /www/sacapuce/plugins/hikashop/fieldcategory/fieldcategory.php:79
> 20 JDatabaseDriver-&gt;loadObject() /www/sacapuce/plugins/hikashop/fieldcategory/fieldcategory.php:154
> 21 JDatabaseDriverMysqli-&gt;connect() /www/sacapuce/libraries/joomla/database/driver.php:1648

Last edit: 10 years 7 months ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODgzNTUzLWNvdWxkLW5vdC1jb25uZWN0LXRvLW15c3FsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[erickb](/forum/user/4069-erickb "View erickb's Profile")**
- [![erickb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4069-erickb "View erickb's Profile") Topic Author
- [ Offline](/forum/user/4069-erickb)

Less More

- Posts: 2705
- Thank you received: 74
-
-

10 years 7 months ago -  10 years 7 months ago [\#235127](#235127) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Could not connect to MySQL](/forum/5-support-en-francais-french-support-/883553-could-not-connect-to-mysql#235127 "-- HikaShop version -- : 35 -- Joomla version -- : 261 -- Error-message(debug-mod must be tuned on) -- : Could not connect to MySQL  Bonjour  Mon site marche très bien en distant mais en local la page produit plante, tout marche sauf cette page, meme si je desactive toutes mes vues c equi fait que je ne quasiment plus faire de développement avec Hikashop en localhost  le debug donne ca et bien sur la connection a la base est bonne")*

on dirait que ca vient de
plugins/hikashop/fieldcategory/fieldcategory.php:154

je viens de tester

> $options = array (
> 'driver' =&gt; $conf-&gt;get('dbtype'),
> 'host' =&gt; $conf-&gt;get('host'),
> 'user' =&gt; $dbConf,
> 'password' =&gt; $conf-&gt;get('password'),
> 'database' =&gt; $dbConf,
> 'prefix' =&gt; $dbConf
> );

en remplacant par les vraie valeur du configuration.php

> $options = array (
> 'driver' =&gt; 'mysqli',
> 'host' =&gt; 'localhost',
> 'user' =&gt; 'root',
> 'password' =&gt; 'root',
> 'database' =&gt; 'db\_name',
> 'prefix' =&gt; 'dbpref\_'
> );

et ca marche

Last edit: 10 years 7 months ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODgzNTUzLWNvdWxkLW5vdC1jb25uZWN0LXRvLW15c3FsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 7 months ago [\#235128](#235128) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Could not connect to MySQL](/forum/5-support-en-francais-french-support-/883553-could-not-connect-to-mysql#235128 "-- HikaShop version -- : 35 -- Joomla version -- : 261 -- Error-message(debug-mod must be tuned on) -- : Could not connect to MySQL  Bonjour  Mon site marche très bien en distant mais en local la page produit plante, tout marche sauf cette page, meme si je desactive toutes mes vues c equi fait que je ne quasiment plus faire de développement avec Hikashop en localhost  le debug donne ca et bien sur la connection a la base est bonne")*

Bonjour,

1 - Non, la connection à la base n'est PAS bonne, sinon vous n'auriez pas le message d'erreur.
2 - Le message d'erreur vient directement de Joomla
3 - Merci de lire très attentivement votre "call stack" afin de pouvoir contacter réellement la bonne personne.

> \_AfterProduct() /www/sacapuce/plugins/hikashop/fieldcategory/fieldcategory.php:79

4 - Le plugin "fieldcategory" est un plugin personnalisé ou vous configurez des connections à des serveurs externes.
5 - En tant que développeur de ce plugin custom, merci de le configurer correctement et de vérifier que vos autres bases de données sont bien fonctionnelles (car, elles ne le sont pas...) ou alors vous pouvez juste le dépublier.

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODgzNTUzLWNvdWxkLW5vdC1jb25uZWN0LXRvLW15c3FsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[erickb](/forum/user/4069-erickb "View erickb's Profile")**
- [![erickb's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4069-erickb "View erickb's Profile") Topic Author
- [ Offline](/forum/user/4069-erickb)

Less More

- Posts: 2705
- Thank you received: 74
-
-

10 years 7 months ago [\#235241](#235241) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Could not connect to MySQL](/forum/5-support-en-francais-french-support-/883553-could-not-connect-to-mysql#235241 "-- HikaShop version -- : 35 -- Joomla version -- : 261 -- Error-message(debug-mod must be tuned on) -- : Could not connect to MySQL  Bonjour  Mon site marche très bien en distant mais en local la page produit plante, tout marche sauf cette page, meme si je desactive toutes mes vues c equi fait que je ne quasiment plus faire de développement avec Hikashop en localhost  le debug donne ca et bien sur la connection a la base est bonne")*

c'est vous qui avez fait ce plugin et je ne comprend pas pourquoi il est appelé en frontend alors que c'est un plugin 100% backend quand on met a jour un produit

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODgzNTUzLWNvdWxkLW5vdC1jb25uZWN0LXRvLW15c3FsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

10 years 7 months ago [\#235274](#235274) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Could not connect to MySQL](/forum/5-support-en-francais-french-support-/883553-could-not-connect-to-mysql#235274 "-- HikaShop version -- : 35 -- Joomla version -- : 261 -- Error-message(debug-mod must be tuned on) -- : Could not connect to MySQL  Bonjour  Mon site marche très bien en distant mais en local la page produit plante, tout marche sauf cette page, meme si je desactive toutes mes vues c equi fait que je ne quasiment plus faire de développement avec Hikashop en localhost  le debug donne ca et bien sur la connection a la base est bonne")*

Bonjour,

Je ne vois pas le rapport ; le plugin est basé sur des évènements qui peuvent arriver en front-end comme en back-end.
Merci de suivre mes indications.

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vODgzNTUzLWNvdWxkLW5vdC1jb25uZWN0LXRvLW15c3FsP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.052 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
