matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.66k stars 2.62k forks source link

Unable to Archive Data in Windows #5375

Closed anonymous-matomo-user closed 10 years ago

anonymous-matomo-user commented 10 years ago

This was reported in the forums June 3rd. [http://forum.piwik.org/read.php?2,116398,116398#msg-116398]

I have the same issue. I am running PHP v5.5.13, Windows Server 2008 R2, and Piwik v2.3.

I have given read/write permissions to the IIS worker account. I have tried running both as a scheduled job and from a command prompt.

I know there are not many windows installations but I would think basic functionality such as archiving data should give this problem a high priority.

C:\PHP>php.exe c:\piwik\console core:archive --url=https://devsrv.suncoast.com/w ebanalytics/ INFO CoreConsole17:57:49 [f3b8e] --------------------------- INFO CoreConsole17:57:49 [f3b8e] INIT INFO CoreConsole17:57:49 [f3b8e] Piwik is installed at: https://dev srv.suncoast.com/webanalytics/index.php INFO CoreConsole17:57:49 [f3b8e] Running Piwik 2.3.0 as Super User ERROR CoreConsole17:57:50 [f3b8e] Got invalid response from API req uest: https://devsrv.suncoast.com/webanalytics/index.php?module=API&method=API.g etDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Resp onse was 'Got invalid response from API request: https://devsrv.suncoast.com/web analytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=or iginal&serialize=1&trigger=archivephp. The response was empty. This usually mean s a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.' ERROR CoreConsole17:57:50 [f3b8e] Got invalid response from API req uest: https://devsrv.suncoast.com/webanalytics/index.php?module=API&method=API.g etDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Resp onse was 'Got invalid response from API request: https://devsrv.suncoast.com/web analytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=or iginal&serialize=1&trigger=archivephp. The response was empty. This usually mean s a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Log file for more details.' ERROR CoreConsole17:57:50 [f3b8e] The Piwik URL https://devsrv.sunc oast.com/webanalytics/index.php does not seem to be pointing to a Piwik server. Response was ''. ERROR CoreConsole17:57:50 [f3b8e] The Piwik URL https://devsrv.sunc oast.com/webanalytics/index.php does not seem to be pointing to a Piwik server. Response was ''.

mattab commented 10 years ago

Thanks for the report! For sure, we would like to fix the core:archive command on Windows for you. I think it works for other users on Windows so it must be a particular problem in your case (that I'm sure many other users also experience).

First, please upgrade your piwik to latest beta: http://piwik.org/faq/how-to-update/faq_159/

We've fixed several bugs related to the archive command so maybe this will help.

if you still have issue afterwards let me know, and we will investigate further!

anonymous-matomo-user commented 10 years ago

I upgraded to the current Beta and got the exact same error message.

INFO CoreConsole12:05:54 [7e9e7] --------------------------- INFO CoreConsole12:05:54 [7e9e7] INIT INFO CoreConsole12:05:54 [7e9e7] Piwik is installed at: https://dev srv.suncoast.com/webanalytics/index.php INFO CoreConsole12:05:54 [7e9e7]

Running Piwik 2.4.0-b7 as Super User

ERROR CoreConsole12:05:54 [7e9e7] Got invalid response from API request: https://devsrv.suncoast.com/webanalytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Response was 'Got invalid response from API request: https://devsrv.suncoast.com/webanalytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty.

mattab commented 10 years ago

Ok we are making progress. Here is what to do next: in your config/config.ini.php addd the following:


[log]
log_level=DEBUG

Then execute the core:archive command.

What output do you get? (remove the token_auth before pasting here)

anonymous-matomo-user commented 10 years ago

I made the change you requested and other than a single debug line, there was no difference. I will say the error messages are a little misleading. It states "does not seem to be pointing to a Piwik server", yet it is able to read and output the correct version number of the installed code. I also tried to increase the memory as suggested but that had no impact. Finally, I want to state that this is a development server and there are only a few hundred records. I don't want you to think it is a massive database it is trying to archive. Below is the captured output:

C:\Users\jbuckley>C:\PHP\php.exe c:\piwik\console core:archive --url=https://devsrv.suncoast.com/webanalytics/ INFO CoreConsole11:17:58 [56cf3] --------------------------- INFO CoreConsole11:17:58 [56cf3] INIT INFO CoreConsole11:17:58 [56cf3] Piwik is installed at: https://devsrv.suncoast.com/webanalytics/index.php INFO CoreConsole11:17:58 [56cf3] Running Piwik 2.4.0-b7 as Super User DEBUG CoreConsole11:17:58 [56cf3] Execute HTTP API request: https://devsrv.suncoast.com/webanalytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp ERROR CoreConsole11:17:59 [56cf3] Got invalid response from API request: https://devsrv.suncoast.com/webanalytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Response was 'Got invalid response from API request: https://devsrv.suncoast.com/webanalytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Logfile for more details.' ERROR CoreConsole11:17:59 [56cf3] Got invalid response from API request: https://devsrv.suncoast.com/webanalytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. Response was 'Got invalid response from API request: https://devsrv.suncoast.com/webanalytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp. The response was empty. This usually means a server error. This solution to this error is generally to increase the value of 'memory_limit' in your php.ini file. Please check your Web server Error Logfile for more details.' ERROR CoreConsole11:17:59 [56cf3] The Piwik URL https://devsrv.suncoast.com/webanalytics/index.php does not seem to be pointing to a Piwik server.Response was ''. ERROR CoreConsole11:17:59 [56cf3] The Piwik URL https://devsrv.suncoast.com/webanalytics/index.php does not seem to be pointing to a Piwik server.Response was ''.

mattab commented 10 years ago

when you open the URL https://devsrv.suncoast.com/webanalytics/index.php?module=API&method=API.getDefaultMetricTranslations&format=original&serialize=1&trigger=archivephp

what do you see as response?

do you also see maybe an error in your server error log file?