[wp-trac] [WordPress Trac] #39935: rest-api not working on PHP Built-in server instance

WordPress Trac noreply at wordpress.org
Fri Feb 24 05:50:28 UTC 2017


#39935: rest-api not working on PHP Built-in server instance
-------------------------------------+-------------------------
 Reporter:  thinkholic               |       Owner:
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:
Component:  REST API                 |     Version:  4.7.2
 Severity:  normal                   |  Resolution:  worksforme
 Keywords:  reporter-feedback close  |     Focuses:  rest-api
-------------------------------------+-------------------------
Changes (by dd32):

 * milestone:  Awaiting Review =>


Comment:

 > With the raw URL param: yes. But still same as with pretty url.

 FWIW; I've just tested this scenario and it works for me, although your
 example of suffixing `./` seems wrong, if you want to pass the docroot in
 you need to use `-t`, passing a path after as in your example appear to
 mean "Direct all HTTP requests to this file" - and `$ php -S 10.1.2.3:8888
 wordpress-develop/src/index.php` seems to work in that case.

 {{{
 $ php -S 10.1.2.3:8888
 PHP 7.1.1 Development Server started at Fri Feb 24 16:44:11 2017
 Listening on http://10.1.2.3:8888
 Document root is /www
 Press Ctrl-C to quit.
 [Fri Feb 24 16:44:16 2017] 10.1.2.3:57506 [200]: /info.php
 - Just checking $_SERVER vars
 [Fri Feb 24 16:44:43 2017] 10.1.2.3:57522 [301]: /wordpress-develop/src/
 - It's normally hosted on port 80, so Canonical kicked in and redirected
 the homepage here
 [Fri Feb 24 16:45:04 2017] 10.1.2.3:57554 [200]: /wordpress-develop/src
 /wp-json/  - The JSON index came up as expected.
 [Fri Feb 24 16:45:04 2017] 10.1.2.3:57555 [200]: /favicon.ico
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39935#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list