maxmind / GeoIP2-php

PHP API for GeoIP2 webservice client and database reader
https://maxmind.github.io/GeoIP2-php/
Apache License 2.0
2.33k stars 276 forks source link

2.1.0 Phar file issues. #33

Closed irazasyed closed 9 years ago

irazasyed commented 9 years ago

Hi,

I updated my phar file from 2.0.0 to 2.1.0 and it causes 2 issues.

  1. It echos - #!/usr/bin/env php at the top of the file where i require it.
  2. Now because this file already outputs before the other files, it ends up throwing headers already sent warning:
Warning</b>:  session_start(): Cannot send session cookie - headers already sent by (output started at path/to/geoip2.phar:2)

Please fix this ASAP. Thanks!

oschwald commented 9 years ago

Thanks. We'll look into this. As a workaround, you might want to try using Composer instead. It will likely perform better as well.

irazasyed commented 9 years ago

No problem.

I've reverted back to 2.0.0 for the time being until the issue is resolved. Composer method is definitely better but it's a client's project and we want to keep the number of files to minimal while shipping/deploying. Thanks though.

oschwald commented 9 years ago

This has been fixed in the Phar for 2.1.1.