Cannot run PHP app


#1

I’m using bradydowling’s “Writing a PHP App” tutorialand testing a very simple PHP application that consists solely of a file with:

<?php echo "My first PHP script!"; ?>

However, when I follow the instructions at the above tutorial I get mixed results, and nothing like I expect. For example, when I do:

Choose Run > Run With > PHP (built-in web server)

I get:

Starting PHP built-in web server, serving https://phaser-politybuilder.c9users.io/tests/test.php.
PHP 5.5.9-1ubuntu4.21 Development Server started at Mon Mar 20 07:33:26 2017
Listening on http://0.0.0.0:8080
Document root is /home/ubuntu/workspace
Press Ctrl-C to quit.

…and that’s it! No preview window or tab showing “My first PHP script!” like I would do if this was on a local machine.


#2

I believe you just need to click on the http://0.0.0.0:8080 or right click on it and select open in preview


#3

Oh that means you should click the link it gives you :slight_smile: https://phaser-politybuilder.c9users.io/tests/test.php


#4

Cheers, thanks for that!

Is there any way I can get it to display it automatically without having to click on the link and choose the display options EVERY time. I can see that getting old real fast.


#5

Ya it’ll go to that same URL every time so you can just keep the other tab open and then refresh the page. That’s what I do :slight_smile:


#6

I am having the same problem as the OP but whenever I click on the first link, it doesn’t load.
I am using the same code as well.