@poing opened this Issue on July 23rd 2015

-- New Installation...

500 GET request to piwik.php failed. Try whitelisting this URL from HTTP Authentication and disable mod_security (you may have to ask your webhost). After making this change, restart your web server.

So wrong! The resolution to this issue was REMOVE non-linux artifacts left in the file.

222.229.x.x - - [23/Jul/2015:23:31:46 +0900] "GET /piwik.php HTTP/1.1" 500 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:39.0) Gecko/20100101 Firefox/39.0"

[user@webserver piwik]# mv piwik.php piwik.old; echo "<?php echo 'foo'; ?>" > piwik.php

222.229.x.x - - [23/Jul/2015:23:33:12 +0900] "GET /piwik.php HTTP/1.1" 200 3 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:39.0) Gecko/20100101 Firefox/39.0"

-- The file loads, there is nothing wrong with the web server.

-- Continue installation
File size mismatch: /var/www/html/piwik/piwik.php (expected length: 2534, found: 21)
-- Nice to see it was checked.

THE SOLUTION:

[user@webserver piwik]# cat piwik.old > piwik.php

-- Indicating there is a non-linux artifact somewhere in the file causing the issue. diff WILL NOT show the two files are different.

@benjackson84 commented on August 10th 2015

Just ran into the same problem, thanks @mattab that was driving me crazy.

@Geobert commented on August 25th 2015

I have the same issue but cat piwik.old > piwik.php did not help :-/

@benjackson84 commented on August 25th 2015

@Geobert I have to admit a couple of times it didn't work for me either. However the files are being compared it seems unstable. Unfortunately I can't help you anymore than to say that I kept trying with it and eventually it would relent. A better approach is probably to delve into how the file comparison is happening in the first place.

@Geobert commented on August 25th 2015

@benjackson84 thanks for your answer, but keep trying what? Just refreshing the page? Or doing cat piwik.old > piwik.php and refresh over and over again?

using 2.14.3 BTW

@benjackson84 commented on August 26th 2015

@Geobert sorry "kept trying" was a bit vague. I ran piwik, then deleted the file then ran piwik again, then restored the file and ran piwik again, then added a new line to the file then ran piwik again, then deleted the new line and ran piwik again. It was a trial and error process (which I hate), I got the impression I was battling with a cache. Eventually it accepted the file.

@ghost commented on September 18th 2015

Same error here, but I don't have an old piwik.php file. After using the latest beta release no problems anymore.

@dcht00 commented on September 21st 2015

Fresh Piwik install on fresh Debian Jessie. Having a "Warning" during Piwik installation for this. Hope it won't bite later.

@mattab commented on September 21st 2015 Owner

Please try with latest beta as hopefully the problem is fixed: http://piwik.org/faq/how-to-update/faq_159/

@dcht00 commented on September 22nd 2015

Could you please point me to verify this is a problem at all? How would it manifest?

@WelliSolutions commented on September 26th 2015

In my case (Piwik 2.14.3, new installation) I can see in Apache's error log:

PHP Fatal error: Uncaught exception 'Exception' with message 'The configuration file {.../config/config.ini.php} has not been found or could not be read.' in .../core/Application/Kernel/EnvironmentValidator.php:64

And IMHO there was no instruction to create such a config file before going through the installation steps. Actually the installation process will create it. After it is created, there's no HTTP 500 error any more. So, just ignoring the warning seems to be ok.

I have installed via wget http://builds.piwik.org/piwik.zip && unzip piwik.zip

@ragnarkarlsson commented on September 27th 2015

I've just run into this issue, running nginx + php-fpm on port 443, Centos 7 + Ajenti V.

Initially saw the 500 error on install, tried disabling the mod_ssl which is running on port 9000 for subversion but no change.

Having looked on my server (which I wget then unzip the file on) the piwik.php is showing as zero bytes.

Moved the file to piwik.old and then pasted into vi a copy of the source piwik.php, saved it and tested with a 200 result.

@simokhalil commented on October 7th 2015

+1 Well done! thanks @mattab

@poing commented on October 15th 2015

@dcht00 it's not something you can always seen in an editor.^M
For example, vim autodetects the file format. Hiding the ^M at the end of each line.^M
It can be a result of using a dos formatted file on a *nix system.^M
^M
The file might look OK, but CR/LF is different.^M
Resulting in the non-linux artifacts left in the file.^M

@thyat000 commented on February 26th 2016

works for me too. I created an empty piwik.php file, then copy and paste the content to this file. voila....the page loads with no errors.
I also ran chmod 775 piwik.php

Thanks,

This Issue was closed on July 28th 2015
Powered by GitHub Issue Mirror