Questions tagged [php-builtin-server]

Built-in web server provided by the CLI SAPI since PHP/5.4.0

Reference: Built-in web server

54 questions
3
votes
2 answers

Running a background process with shell_exec from the PHP built-in webserver

The PHP built-in webserver does not seem to handle shell_exec()ing background processes properly; the request hangs until the background process is complete, even if it's explicitly placed in the background with &. Example: $ ls runit.php $ cat…
sil
  • 1,769
  • 1
  • 18
  • 34
3
votes
1 answer

xdebug not working on netbeans with built-in server using laravel

I ran into an issue when trying to debug in NetBeans. I set breakpoints and click on a Debug Project button (Ctrl+F5), but no debug info is shown in the IDE. Also, phpinfo(); doesn't provide me with an xdebug section. I'm using Laravel framework…
3
votes
3 answers

Routing PHP 5.4+ Built-in Web Server like .htaccess

I have started using the PHP 5.6's built in web server using the following command: php -S localhost:80 I was using WAMP Server before. And the manual also says that, if you give a router script to the above command, say like: php -S localhost:80…
Praveen Kumar Purushothaman
  • 164,888
  • 24
  • 203
  • 252
3
votes
1 answer

Running symfony 2 project in php built in web server

I'm trying to create and run a Symfony 2 (2.5) project on Netbeans with built in php web server, I've added the following router script. > if (isset($_SERVER['SCRIPT_FILENAME'])) { return false; } else { $_SERVER['SCRIPT_FILENAME'] =…
gnaanaa
  • 323
  • 4
  • 18
2
votes
1 answer

PHP Built-in web server and syntax error in a router script

I am using PHP Built-in web server for testing purposes. For example, with a simple router script:
fracz
  • 20,536
  • 18
  • 103
  • 149
2
votes
1 answer

PHP builtin server/routing script: Empty superglobals

I'm trying to start a local server that catches all Urls called. Basically I want to simulate a REST-Interface for testing purposes, and write all Urls and the POST/PUT/PATCH Data to a file. I start the server like this: php -S localhost:9999 -t…
Fels
  • 1,214
  • 2
  • 13
  • 27
2
votes
1 answer

I cannot reach php built-in server running on a VM

I have a too basic php application that I wante to run through the built-in php server and that lives in my VM in my windows machine:
smarber
  • 4,829
  • 7
  • 37
  • 78
2
votes
1 answer

PHP Built in Server Not Working with Vagrant in Host Machine

I'm using vagrant box hashicorp/precise64, Ubuntu 14.04, and PHP 5.6. My Vagrantfile has config.vm.network "forwarded_port", guest: 80, host: 8080 I'm trying to test with the built in PHP server using: php -S localhost:80 The server is up in the…
Linny
  • 333
  • 1
  • 2
  • 10
2
votes
3 answers

Phalcon Micro app doesn't route correctly with query strings

I'm trying to develop a RESTful API with a Micro app in Phalcon. Now I'm working in the social login with the Facebook SDK for PHP, but I find that when Facebook redirects me to my callback (with a query string inside obviously) the router doesn't…
soutoner
  • 571
  • 2
  • 14
2
votes
1 answer

Wordpress Multisite development on PHP Built-In Webserver

I am trying to set up a development environment for Wordpress multisite on my local MAC. I am developing using PHPStorm, and the built-in PHP webserver. One of the limitations of the built-in webserver is that is doesn't support apache…
Denny
  • 186
  • 1
  • 10
2
votes
0 answers

How to unbind the php built-in server from a directory?

I created a local WordPress site and in XAMPP set it up with Virtual Hosts so the address test-wp.dev was the home adress. All was working fine and then for some reason I decided to turn off apache, leave mysql on and try the build in server. So I…
Luke Watts
  • 457
  • 5
  • 13
2
votes
1 answer

How to port forward php-built in port number to localhost

PHP has a built-in server that connects to localhost through port 8888. i.e localhost:8888 I would like to know if it is possible to remove the port number using any port-forwarding method or application, so I can connect to it directly using just…
iOi
  • 403
  • 3
  • 8
  • 26
1
vote
1 answer

Is there a way to allow dots in request urls in php?

when a request url has a dot in it I am getting a 404 error Not found page that says "The requested resource /error.example was not found on this server." What causes this error and is there a way of fixing it? I am using the Slim framework and run…
Thanos7878
  • 13
  • 3
1
vote
0 answers

How to provoke PHP's built-in webserver to spit out its built-in "404 Not Found" webpage?

For security purposes, I fake this in one place in my code for certain requests: http_response_code(404); die(); This will return the correct (fake) "404 Not Found" HTTP status code, and show a blank page. I could of course replicate/fake the error…
1
vote
0 answers

PHP built-in webserver ruins foreign characters

I recently started using PHP's built-in webserver a lot more. Unfortunately serving pages through it seems to have an effect on pages that retrieve data from our oracle database containing ÆØÅ. The first image is when I run the script through…
Jazerix
  • 4,729
  • 10
  • 39
  • 71