Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Developer Call the API via PHP is not working: Session Start #1513

Closed
anonymous-matomo-user opened this issue Jul 25, 2010 · 1 comment
Closed
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Milestone

Comments

@anonymous-matomo-user
Copy link

I tried everything possible to make it work for calling the API via php. The request works fine if isend him via html request,but if i change to "build in", what means using the php version of calling the api, I get always the following message.

session has already been started by session.auto-start or session_start()
Backtrace:

#0 /home/mm/public_html/sites/all/modules/piwik_api/piwik/libs/Zend/Session/Namespace.php(143): Zend_Session::start(true)
#1 /home/m/public_html/sites/all/modules/piwik_api/piwik/plugins/LanguagesManager/API.php(179): Zend_Session_Namespace->__construct('Piwik_Languages...')
#2 /home/mm/public_html/sites/all/modules/piwik_api/piwik/plugins/LanguagesManager/LanguagesManager.php(144): Piwik_LanguagesManager_API->getLanguageForSession()
#3 /home/mm/public_html/sites/all/modules/piwik_api/piwik/plugins/LanguagesManager/LanguagesManager.php(111): Piwik_LanguagesManager::getLanguageFromPreferences()
#4 /home/mm/public_html/sites/all/modules/piwik_api/piwik/plugins/LanguagesManager/LanguagesManager.php(65): Piwik_LanguagesManager::getLanguageCodeForCurrentUser()
#5 [internal function]: Piwik_LanguagesManager->getLanguageToLoad(Object(Piwik_Event_Notification))
#6 /home/mm/public_html/sites/all/modules/piwik_api/piwik/libs/Event/Dispatcher.php(284): call_user_func_array(Array, Array)
#7 /home/mm/public_html/sites/all/modules/piwik_api/piwik/core/PluginsManager.php(532): Event_Dispatcher->postNotification(Object(Piwik_Event_Notification), true, false)
#8 /home/mm/public_html/sites/all/modules/piwik_api/piwik/core/Translate.php(88): Piwik_PostEvent('Translate.getLa...', NULL)
#9 /home/mm/public_html/sites/all/modules/piwik_api/piwik/core/Translate.php(50): Piwik_Translate->getLanguageToLoad()
#10 /home/mm/public_html/sites/all/modules/piwik_api/piwik/core/FrontController.php(243): Piwik_Translate->loadUserTranslation()
#11 /home/mm/public_html/sites/all/modules/piwik_api/piwik_api.connector.inc(483): Piwik_FrontController->init()
#12 [internal function]: piwik_api_connector_test(Array)
#13 /home/mm/public_html/includes/form.inc(372): call_user_func_array('piwik_api_conne...', Array)
#14 [internal function]: drupal_retrieve_form('piwik_api_conne...', Array)
#15 /home/mm/public_html/includes/form.inc(102): call_user_func_array('drupal_retrieve...', Array)
#16 [internal function]: drupal_get_form('piwik_api_conne...')
#17 /home/mm/public_html/includes/menu.inc(348): call_user_func_array('drupal_get_form', Array)
#18 /home/mm/public_html/index.php(18): menu_execute_active_handler()
#19 {main}

I tried it with entries in htaccess files, checked the php settings session.autostart und bootstrap.php. Nothing is working.
I use drupal for the integration and calling the api.
Maybe this helps to find the problem
Keywords: developer, api, call

@robocoder
Copy link
Contributor

Refer to the examples in piwik/misc/api_*.php. Note: these have been recently updated in svn.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

3 participants