-
Notifications
You must be signed in to change notification settings - Fork 34
DOCSP-41952: Download and Install #92
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
Changes from 3 commits
6418d93
5ef0ac6
005d830
cc32aa5
186f149
48abf5f
0582736
4d951ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,5 +3,4 @@ build/* | |
| build | ||
| *~ | ||
| *giza.log | ||
| source/* | ||
| backups/* | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| .. _php-get-started: | ||
|
|
||
| ================================ | ||
| Get Started with the PHP Library | ||
| ================================ | ||
|
|
||
| .. contents:: On this page | ||
| :local: | ||
| :backlinks: none | ||
| :depth: 2 | ||
| :class: singlecol | ||
|
|
||
| .. facet:: | ||
| :name: genre | ||
| :values: tutorial | ||
|
|
||
| .. meta:: | ||
| :description: Learn how to create an app to connect to MongoDB deployment by using the PHP library. | ||
| :keywords: quick start, tutorial, basics | ||
|
|
||
| .. toctree:: | ||
|
|
||
| /get-started/download-and-install/ | ||
|
|
||
| Overview | ||
| -------- | ||
|
|
||
| The {+php-library+} is a high-level abstraction for the MongoDB PHP extension, which | ||
| you can use to connect to MongoDB and interact with data stored in your deployment. | ||
| This guide shows you how to create an application that uses the {+php-library+} to | ||
| connect to a MongoDB cluster hosted on MongoDB Atlas and query data in your cluster. | ||
|
|
||
| .. tip:: | ||
|
|
||
| MongoDB Atlas is a fully managed cloud database service that hosts your MongoDB | ||
| deployments. You can create your own free (no credit card required) MongoDB Atlas | ||
| deployment by following the steps in this guide. | ||
|
|
||
| Follow this guide to connect a sample PHP application to a MongoDB Atlas | ||
| deployment. If you prefer to connect to MongoDB using a different driver or | ||
| programming language, see our :driver:`list of official drivers <>`. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,87 @@ | ||||||
| .. _php-download-and-install: | ||||||
|
|
||||||
| ==================== | ||||||
| Download and Install | ||||||
| ==================== | ||||||
|
|
||||||
| .. facet:: | ||||||
| :name: genre | ||||||
| :values: tutorial | ||||||
|
|
||||||
| .. meta:: | ||||||
| :keywords: setup, composer, installation, code example | ||||||
|
|
||||||
| .. procedure:: | ||||||
| :style: connected | ||||||
|
|
||||||
| .. step:: Install dependencies | ||||||
|
|
||||||
| Before you begin developing, ensure that you have the following | ||||||
| dependencies installed on your local machine: | ||||||
|
|
||||||
| - `PHP <https://www.php.net/manual/en/install.php>`__ | ||||||
|
||||||
| - `Composer <https://getcomposer.org/download/>`__ | ||||||
|
|
||||||
| .. step:: Install the MongoDB extension | ||||||
|
||||||
| .. step:: Install the MongoDB extension | |
| .. step:: Install the MongoDB PHP extension |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To enable the ``mongodb`` extension, add the following line to the top of | |
| To enable the ``mongodb`` extension in your PHP configuration file, add the following line to the top of |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| from your shell: | |
| the following shell command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or to create consistency: "running the following command in your shell"
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: To my knowledge, the touch command only works on linux/mac machines. This thread: https://stackoverflow.com/questions/30011267/create-an-empty-file-on-the-commandline-in-windows-like-the-linux-touch-command provides alternatives that I think work on both Windows and Linux, unless we want to specify that this guide is only valid for mac/linux machines
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To install the {+php-library+}, run the following command from your ``php-quickstart`` | |
| To install the {+php-library+}, run the following command in your ``php-quickstart`` |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Do the users add this line at the end of the file, or at the beginning/does placement of the line matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should go at the top
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| After you complete these steps, you have a new project directory | |
| After you complete these steps, you have a new project directory, a new application file, |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| .. note:: | ||
|
|
||
| If you run into issues on this step, ask for help in the | ||
| :community-forum:`MongoDB Community Forums <tag/php/>` | ||
| or submit feedback by using the :guilabel:`Rate this page` | ||
| tab on the right or bottom right side of this page. |
Uh oh!
There was an error while loading. Please reload this page.