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
DateTime error in gitlist #175
Comments
Have you set your timezone in your /etc/php.ini file? -- Gary F. On Sep 20, 2012, at 12:09 PM, genanr notifications@github.com wrote:
|
Duplicate of #174 |
I did set the timezone in /etc/php5/cli/php.ini and my php version is 5.3.5-1ubuntu7.11. I had tried setting the timezone before I posted on here. |
Again, that issue has nothing to do with the timezone configuration in your @klaussilveira so it is necessary to set PHP version requirement for Gitlist from 5.3.3 to 5.3.6 |
@pschirch is 99% correct, however my CentOS box was running PHP I mean really, that should be set anyway - but if you're tossing up a VM to play with, don't forget. |
@pschirch I can confirm swell, having the same issue's |
I understand the idea of saying "you need to have all the latest versions in order to play with new toys" and I do it myself to a degree, however, I always temper my attitude to old versions of software with reality and that is that sometimes people can have 5.3.x but not 5.3.3 or whatever and if you're code only works on the highest, ultimate last version and without that version it will not run correctly, I feel the correct course is to come down from the high horse and contemplate another solution. otherwise you are artificially limiting the usefulness of your software for some technical goal which most people cannot reach. All for the sake of simply choosing another solution which can expose your software to another double digit increase in potential users. it's like ruby, sometimes packages are made with such high requirements, that I can't use them without hacking my server to bits and I won't do that for a piece of software, however installing some special consideration I will do, but making my server potentially unstable JUST for gitlist is just not going to happen. so please come down from the high horse and fix this another way, one which lets people with earlier versions of 5.3.x use the software, there isn't really an excuse to say no, apart from technical purity just for the sake of it. |
Anything lower then PHP 5.3.3 will simply not work. Silex which is used for Gitlist requires at least PHP 5.3.3 simply because any version lower then this will fail due to some serious bugs in those versions of php. But the DateTime::__construct() expects parameter 2 to be DateTimeZone, null given bug can be easily fixed by checking what is passed to it and in case of null changing it to |
This has been fixed in latest master, both GitList and Gitter. Can someone having problems check it out? |
me! I downloaded the zip file, unpacked it, I'm missing the vendor directory, the last time I downloaded the zip, I had the vendor directory, is that on purpose? |
ok, maybe I've misunderstood you, but this issue isn't fixed if you download and install the master, the vendor directory is missing, I went and copied the vendor directory from the old version. but even then I still have a problem....so lets try downloading gitter master and unpack it....... yes, it works! the steps I followed were
bingo, it works! awesome! thanks klauss, I dont know if my comment inspired you to fix it rather than leave people behind, but I'm happy that it's fixed and working! awesome job! |
Have you downloaded the zip from the official website or GitHub? If you're downloading from GitHub, you won't get the correct "package" and you'll have to install the dependencies by yourself, through Composer. Follow the "developer" instructions to correctly setup GitList from a GitHub zip/tarball or a direct clone. |
ah, I didnt realise that, you are right I downloaded the first from the website, but then downloaded the update from github, I thought they were the same because it was the same master.zip file. it's not broken now, it's working because I installed the vendor and gitter parts indepedantly |
If you are running a RHEL repo with the buggy PHP version, try this dirty hack to at least view the commit histories. Add _$timezone = new \DateTimeZone("UTC");_ right after the class definition to hard-code to UTC (or whatever other timezone you are happy with). It may not be pretty, but at least will get you by until your local repo gets updated to a later version of PHP. /var/www/html/gitlist/vendor/klaussilveira/gitter/lib/Gitter/Util/DateTime.php:
|
I am getting the following when trying to view commits in gitlist.
Oops! DateTime::__construct() expects parameter 2 to be DateTimeZone, null given
The text was updated successfully, but these errors were encountered: