microsoftgraph/php-connect-rest-sample

PHP 7.0.8

rogerywoo opened this issue · 8 comments

Running this example on php 7.0.8, instead of getting the microsoft login page, you get:
Warning: Cannot modify header information - headers already sent by (output started at /home/vagrant/phpgraphazuremaster/app/oauth.php:34) in /home/vagrant/phpgraphazuremaster/app/oauth.php on line 47

Thanks for trying this sample, @rogerywoo. We haven't yet tested this against PHP 7.x.
I'll make some time soon to look at this.

cc @AJMayMSFT

@rogerywoo

I just tried with php 7 and I see some warnings, but the sample works fine. The login page is displayed and I can sign in.

Can you provide some more information? Operating system, repro steps...
Does that warning appear on the console or the browser?

I am using laravel/homestead virtualbox which is running nginx.

Here are the steps I took using Chrome.

On my local machine (Windows 10) with php5.6, ran the app using php -S
0.0.0.0:8000 -t app. - Got Microsoft Login Screen
Ran the application on laravel/homestead 3 virtualbox (ubuntu) with PHP7.0
and nginx. Only received Warning Page. Did not see Microsoft Login Screen.
On the same virtual box, switched nginx to run with PHP 5.6. - Got
Microsoft Login Screen

Let me know if I can be of further assistance

Roger

On Thu, Oct 6, 2016 at 1:59 PM, Ricardo Loo notifications@github.com
wrote:

@rogerywoo https://github.com/rogerywoo

I just tried with php 7 and I see some warnings, but the sample works
fine. The login page is displayed and I can sign in.

Can you provide some more information? Operating system, repro steps...
Does that warning appear on the console or the browser?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#27 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGdUKTw9_foSaj2afZy6ZxO_FTJWB3F6ks5qxTcagaJpZM4KPVW9
.

Just FYI, I'm looking at this. It might take some time because I'm not familiar with Homestead. But I'm definitely interested in making this work in that environment.

Before checking on Homestead, can you see if it works running on ubuntu
with php7?

On Fri, Oct 7, 2016 at 12:53 PM, Ricardo Loo notifications@github.com
wrote:

Just FYI, I'm looking at this. It might take some time because I'm not
familiar with Homestead. But I'm definitely interested in making this work
in that environment.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#27 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGdUKTqIDi3WJebrJSxsQG_zr42tJbbYks5qxnj4gaJpZM4KPVW9
.

It's running on Ubuntu 14.04 with PHP 7.0.11

It sends the same warnings in the console as in Windows, but it displays the Microsoft login page just fine. I'm able to sign in and continue to send an email from the app.

Here is a link with my console output.

I also ran the same test on my virtual box using PHP7 and the built-in
webserver php -S 0.0.0.0:8000 -t app server. It works fine. If I switch
to the nginx server, it fails. I believe the problem is with the Nginx
server and php combo. The Nginx server I am using is 1.11.1.

Thanks,

On Tue, Oct 11, 2016 at 2:04 PM, Ricardo Loo notifications@github.com
wrote:

It's running on Ubuntu 14.04 with PHP 7.0.11

It sends the same warnings in the console as in Windows, but it displays
the Microsoft login page just fine. I'm able to sign in and continue to
send an email from the app.

Here is a link with my console output http://pastebin.com/cvMTZvCA.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#27 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGdUKXgl9bCCa6S5VLVRYfD3dWlvnulgks5qy8-TgaJpZM4KPVW9
.

I'm unable to repro this on a Linux box running Nginx and PHP7.
StackOverflow has a list of reasons the headers already sent error occurs. The most promising would be to look at the php.ini settings for runtime configuration.