Added Vagrantfile for easy launching by bluebaroncanada · Pull Request #66 · bshaffer/oauth2-demo-php · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Added Vagrantfile for easy launching #66

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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

bluebaroncanada
Copy link

No description provided.

Copy link
Owner

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow nice work!!!

@bluebaroncanada
Copy link
Author

Thanks!

@bshaffer
Copy link
Owner

A Dockerfile would also be a nice touch

@bshaffer
Copy link
Owner

Also, it would be good to link to Vagrant installation in the README for users who want to try Vagrant but do not have it set up.

Copy link
Owner

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got the error General error: 14 unable to open database file when running the Authorization code, refresh, and implicit flows, and the error Failed to connect to localhost port 8081 when running the User Credentials flow. I also received the oauth error Invalid or missing response type when running OpenID's ID Token flow.

README.md Outdated
@@ -10,6 +10,37 @@ If this is your first time here, try [experimenting with the live demo](http://b
Installation
------------

## With Vagrant

$ vagrant up
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include installation instructions and instructions on what to do after this command, i.e. Now browse to http://localhost:8080 to see the OAuth2 Demo Application

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes. My bad. Will fix.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I'm having none of these errors. Can you give me some instructions on how to recreate?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even see where in the code you're connecting to 8081.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Figured it out. Now I'm getting the connection error. Fixing ...

@bluebaroncanada
Copy link
Author

I could do that, but there are several issues with Docker that really boil down to: Docker is meant for production environments. The idea is to have as little running on one container as possible; separating the web server from the DB. Even setting up SSH is a PITA, whereas for Vagrant you just type vagrant ssh. There's also issues with getting it to run on several different systems including, for example, Windows Home editions.
As for the Vangrant installation, I could also do that, but I'd rather just link to Vagrant's own documentation so it's always fresh. Maybe a couple lines of advice. I figure it would be the same as explaining how to install Git. I'll defer to you on both, though. I guess I'd start by trying to find an Docker with xdebug already setup.

@bshaffer
Copy link
Owner

bshaffer commented Sep 11, 2017

No, I totally agree about linking to vagrant's documentation. Currently there is no link. Also, I believe further setup is required, as I was receiving errors. So really, just do a few things to flesh out the vagrant instructions:

  1. Link to vangrant's install instructions
  2. Include any additional setup (to resolve the above errors)
  3. Include instructions on how to load the demo (i.e. open localhost:8080)

README.md Outdated
@@ -10,6 +10,41 @@ If this is your first time here, try [experimenting with the live demo](http://b
Installation
------------

We have provided a Vagrantfile for easy installation. Vagrant is software that controls some of the major virtualization software such as [VMWare Workstation](https://www.vmware.com/products/workstation.html) and [Oracle VirtualBox](https://www.virtualbox.org/). With a simple text file, you can clone a machine to run locally on your computer. More details can be found at https://www.vagrantup.com.
Copy link
Owner

@bshaffer bshaffer Sep 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These instructions should be moved under ## With Vagrant, as they are specific to that section. Also, the vagrant hyperlink at the end should be actually linked, i.e. [https://www.vagrantup.com](https://www.vagrantup.com)

@bluebaroncanada
Copy link
Author

Is that after the changes I posted about an hour ago?

@bluebaroncanada
Copy link
Author

Can you try checking out my latest changes and then run vagrant destroy --force && vagrant up?


a2enmod rewrite
echo "xdebug.remote_enable=on" >> /etc/php/5.6/apache2/conf.d/xdebug.ini
echo "xdebug.remote_host=192.168.34.1" >> /etc/php/5.6/apache2/conf.d/xdebug.ini
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This address seems oddly specific (192.168.34.1). Why is that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that 33 is the default. I could be wrong.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

33 definitely used to be/possibly is still the default. Doing a quick Google search returns tons of documents with 192.168.33.1.

@bshaffer
Copy link
Owner

@bluebaroncanada unfortunately I'm still getting the error:

PDOException in Pdo.php line 205:
SQLSTATE[HY000]: General error: 14 unable to open database file

@bluebaroncanada
Copy link
Author

bluebaroncanada commented Sep 12, 2017

So weird. Are you on Mac or Linux by chance and you don't have 777 as the permissions for that directory? Can you give me a list of instructions you're running from git clone ... to vagrant up? It should be so that all you have to do is those two commands.

@bluebaroncanada
Copy link
Author

@bshaffer did you check the permissions on your data directory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.