php-connect-rest-sample icon indicating copy to clipboard operation
php-connect-rest-sample copied to clipboard

PHP 7.0.8

Open rogerywoo opened this issue 10 years ago • 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

rogerywoo avatar Oct 05 '16 21:10 rogerywoo

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

ricalo avatar Oct 06 '16 00:10 ricalo

@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?

ricalo avatar Oct 06 '16 17:10 ricalo

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 [email protected] 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 https://github.com/microsoftgraph/php-connect-rest-sample/issues/27#issuecomment-252040685, or mute the thread https://github.com/notifications/unsubscribe-auth/AGdUKTw9_foSaj2afZy6ZxO_FTJWB3F6ks5qxTcagaJpZM4KPVW9 .

rogerywoo avatar Oct 06 '16 18:10 rogerywoo

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.

ricalo avatar Oct 07 '16 16:10 ricalo

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 [email protected] 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 https://github.com/microsoftgraph/php-connect-rest-sample/issues/27#issuecomment-252304151, or mute the thread https://github.com/notifications/unsubscribe-auth/AGdUKTqIDi3WJebrJSxsQG_zr42tJbbYks5qxnj4gaJpZM4KPVW9 .

rogerywoo avatar Oct 11 '16 11:10 rogerywoo

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.

ricalo avatar Oct 11 '16 18:10 ricalo

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 [email protected] 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 https://github.com/microsoftgraph/php-connect-rest-sample/issues/27#issuecomment-252996129, or mute the thread https://github.com/notifications/unsubscribe-auth/AGdUKXgl9bCCa6S5VLVRYfD3dWlvnulgks5qy8-TgaJpZM4KPVW9 .

rogerywoo avatar Oct 12 '16 15:10 rogerywoo

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.

caitlinrussell avatar Jan 27 '17 20:01 caitlinrussell