You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a file with some login details that I want to use to connect to an external database. But when I try to use the code below, I get some funny error messages. Can someone tell me what I am doing wrong inside piwik, please? Is it possible to connect to a file inside piwik? If yes, how do you normally do that, please?
I have this code that I want to use to connect to another file within my piwik plugin.
if (!require_once("../../../test_config.php")) {echo "inc failed";}
$con = mysql_connect(DB_HOST_SSOS, DB_USER_SSOS, DB_PASSWORD_SSOS);
if (!$con) { die('Sorry, could not connect: ' . mysql_error());}
$db_selected = mysql_select_db("ssos", $con);
if (!$db_selected) {die("It was not possible to use test_db : " . mysql_error());}
But when I run the code, I get this error message below.
PHP Fatal error: require_once(): Failed opening required '../../../test_config.php' (include_path='/home/work/company/piwik/vendor/pear/pear_exception:/home/work/company/piwik/vendor/pear/console_getopt:/home/work/company/piwik/vendor/pear/pear-core-minimal/src:/home/work/company/piwik/vendor/pear/archive_tar:/home/work/company/piwik/vendor/phpseclib/phpseclib/phpseclib:/home/work/company/piwik/vendor/phpunit/php-text-template:/home/work/company/piwik/vendor/phpunit/php-timer:/home/work/company/piwik/vendor/phpunit/php-file-iterator:.:/usr/share/php:/usr/share/pear') in /home/work/company/piwik/plugins/TestPlugin/Reports/GetCityContributors.php on line 30
Your help will be appreciated please.
The text was updated successfully, but these errors were encountered:
tsteur
added
the
answered
For when a question was asked and we referred to forum or answered it.
label
May 18, 2015
Hi Folks,
I have a file with some login details that I want to use to connect to an external database. But when I try to use the code below, I get some funny error messages. Can someone tell me what I am doing wrong inside piwik, please? Is it possible to connect to a file inside piwik? If yes, how do you normally do that, please?
I have this code that I want to use to connect to another file within my piwik plugin.
But when I run the code, I get this error message below.
PHP Fatal error: require_once(): Failed opening required '../../../test_config.php' (include_path='/home/work/company/piwik/vendor/pear/pear_exception:/home/work/company/piwik/vendor/pear/console_getopt:/home/work/company/piwik/vendor/pear/pear-core-minimal/src:/home/work/company/piwik/vendor/pear/archive_tar:/home/work/company/piwik/vendor/phpseclib/phpseclib/phpseclib:/home/work/company/piwik/vendor/phpunit/php-text-template:/home/work/company/piwik/vendor/phpunit/php-timer:/home/work/company/piwik/vendor/phpunit/php-file-iterator:.:/usr/share/php:/usr/share/pear') in /home/work/company/piwik/plugins/TestPlugin/Reports/GetCityContributors.php on line 30
Your help will be appreciated please.
The text was updated successfully, but these errors were encountered: