I had a few challenges when moving my project to a hosting provider and thought I would share the information:
Problems getting PDO working
----------------------------------------
On my server the RaxanPDO connection worked fine connecting to mysql, but when I tried connecting
to the hosting provider's mysql instance I kept getting the error:
SQLSTATE[HY000][2002]Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'(2)
Solution
----------------------------------------
Remove all spaces in the dsn parameter of the $config['db.default'] array (or other db connection array) in your gateway.config.php
'dsn' => 'mysql: host=localhost; dbname=mysql', (does not work)
'dsn' => 'mysql:host=localhost;dbname=mysql', (does work)
(Googling the error did not help as the error and solution do not seem to have anything to do with each other)
Also, initially my hosting provider tried to tell me my scripts were coded wrong because their example using mysql_connect
worked just fine. I had to explain that I was using something called PDO and not the native mysql_connect function call.
I actually read where one hosting provider said they don't support PDO for mysql because it appeared to be "the old way to
access mysql from PHP". This is simply NOT true. Luckily my provider supports it.
Problem
-----------------------------------------
Fatal error: Raxan::loadWidget() [function.require]: Failed opening required '/mysite/raxan/ui/widgets/myWidget.php'
The widget I was trying to load is called: mywidget.php
Solution
-----------------------------------------
My development environment is on a Windows machine and php filenames are not case sensitive. On most hosting providers,
the server is Linux/Unix and filenames are case sensitive. My bad. So, changing to Raxan::loadWidget('mywidget.php') instead
of Raxan::loadWidget('myWidget.php') fixed it.
Problem
-----------------------------------------------------------
jQuery calls stopped working on pages accessed from folders other than the server root
Solution
------------------------------------------------------------------
Turns out the path to startup.js (for example: ./raxan/startup.js) was not getting set properly in pages in a directory
other than the web root directory. Not good. To fix this, I set the $config['raxan.url'] and $config['raxan.path']
(you need to set both path and url or they will be ignored) to point to the Raxan location.
Hope someone can benefit from this.