Problem/Motivation
With the PHP version 5.4.0 and above, PHP includes an embedded server. This server can be used to easily and quickly set up projects. Currently Drupal needs to implement a router script in order to works with the PHP embedded server.
Proposed resolution
This module was created to provide an easy way to start Drupal using PHP embedded server. This module provides a Drush command which let to set the project host and handles the routing to start Drupal.
This module also provide an php script with let start the server without need of Drush and it can be used for first time installations.
Remaining tasks
Currently an php script let it works without need of the module installation, witch let not depends of Drush, but next task will be to allow it be execute from a global Drush installation and no need to enable this module in order to use Drush.
PHP Server Project https://www.drupal.org/sandbox/andrefy/2418877
Git Repository
git clone --branch 7.x-1.x http://git.drupal.org/sandbox/andrefy/2418877.git php_server
cd php_server
Issues reported at Drupal Community related with this project
https://www.drupal.org/node/1543858 This will be at the core of Drupal 8 but still not project for Drupal 7
Why Use PHP Embedded Server
- It is an alternative to other servers like apache, nginx, ...
- It allows to have an easy Drupal set up, this server is intent to be used for local environments for development propouses.
- It holds the property routing, so you don't have to create a virtual host configuration.
- Drush command let you to run the server just when it needed so you will don't have several sites listen server host like apache does with virtual host
Example of use from a fresh Drupal Installation
- Download Drupal
- Download the php_server module and place it on the Drush profile folder. Ex: ~/.drush/php_server.
- Run: drush ss
Example:
// Place php server at drush profile folder
mv php_server ~/.drush/php_server
cd [project root folder]
drush ss
This command will ask you for the ip and port to start the server, defaults are http://0.0.0.0:8181
- Open the browser at the default url:
http://0.0.0.0:8181
Screen shoot

Manual reviews of other projects
| Comment | File | Size | Author |
|---|---|---|---|
| #28 | coder-results.txt | 1.47 KB | klausi |
| #9 | Screenshot 2015-02-20 15.33.57.png | 1.09 MB | andrefy |
Comments
Comment #1
PA robot commentedThere are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxandrefy2418877git
We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)
Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #2
andrefy commentedComment #3
arijits.drushPlease change git clone command
from
to
Manual Review
Individual user account
Yes: Follows the guidelines for individual user accounts.
No duplication
Yes: Does not cause module duplication and/or fragmentation.
Master Branch
Yes: Follows the guidelines for master branch.
Licensing
Yes: Follows the licensing requirements.
3rd party assets/code
Yes: Follows the guidelines for 3rd party assets/code.
README.txt/README.md
No: Does not follow , Please use Read me template
Code long/complex enough for review
No: Does not follow the guidelines for project length and complexity.
Secure code
Yes:Meets the security requirements
Coding style & Drupal API usage
This review uses the Project Application Review Template.
Comment #4
arijits.drushComment #5
klausiThe readme formatting is surely not an application blocker, anything else that you found or should this be RTBC instead?
Comment #6
andrefy commented@arijits.drush Thanks for you review, the REAMD file was updated using the recommended template
Comment #7
andrefy commentedComment #8
mattdanger commentedI've reviewed the code base and tested functionality for this project and have not found any blocking issues. Perhaps you could provide an example or documentation of a simple use case for a Drupal server?
Comment #9
andrefy commentedComment #10
andrefy commented@MattDanger
Thanks for the review, I added a more detail description of why this module and the PHP Embedded Server, and also some instructions, if you have any other feed back I will be glad to heard it.
Comment #11
andrefy commented@MattDanger
Thanks for the review, I added a more detail description of why this module and the PHP Embedded Server, and also some instructions, if you have any other feed back I will be glad to heard it.
Comment #12
andrefy commentedComment #13
casivaagustin commentedMy comments.
Readme.TXT
-----------
> Typo in line 41, says necesary and must be necessary
I don't think this is necessary if you are doing this as a drush command.
"php [module path]/php_server.start.inc -s 0.0.0.0:8181"
Avoid that redundancy, is not necessary since with drush is better.
Module
-------
I tried to use the module, I cloned, when I try to run the start server I got an error since requieres the php_server module enabled.
Then I tried to enabled the module
I created an empty module file (php_server.module) and I was able to enable the module
Once the module was enabled a tried again tu run the server
I think it would be better of you validate the $server variable and print a better error message if the server address is not set.
When I did this it worked
I suggest to change the alias to pss instead of just ss.
Cheers
Comment #14
andrefy commentedThanks @casivaagustin, I applied your suggestion and updated this module.
Comment #15
andrefy commentedComment #16
andrefy commentedComment #17
andrefy commentedComment #18
andrefy commentedComment #19
andrefy commentedComment #20
andrefy commentedComment #21
andrefy commentedComment #22
andrefy commentedComment #23
andrefy commentedComment #24
andrefy commentedComment #25
andrefy commentedComment #26
andrefy commentedComment #27
klausiRemoving some automated reviews that don't include a manual review.
Comment #28
klausiReview of the 7.x-1.x branch (commit 8c6e23b):
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
Otherwise looks good to me. Assigning to MiSc as he might have time to take a final look at this.
Comment #29
andrefy commentedok, thanks for the review klausi
Comment #30
klausino objections for more than a week, so ...
Thanks for your contribution, andrefy!
I promoted this project for you: https://www.drupal.org/project/php_server
Now that this experimental project has been promoted, you'll need to update the URL of your remote repository or reclone it.
Here are some recommended readings to help with excellent maintainership:
You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and stay involved!
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Thanks to the dedicated reviewer(s) as well.
Comment #31
PA robot commentedProject 1: https://www.drupal.org/node/2486797
Project 2: https://www.drupal.org/node/2420901
As successful completion of the project application process results in the applicant being granted the 'Create Full Projects' permission, there is no need to take multiple applications through the process. Once the first application has been successfully approved, then the applicant can promote other projects without review. Because of this, posting multiple applications is not necessary, and results in additional workload for reviewers ... which in turn results in longer wait times for everyone in the queue. With this in mind, your secondary applications have been marked as 'closed(duplicate)', with only one application left open (chosen at random).
If you prefer that we proceed through this review process with a different application than the one which was left open, then feel free to close the 'open' application as a duplicate, and re-open one of the project applications which had been closed.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #32
klausilet's leave this as fixed.