Closed maxailloud closed 9 years ago
Ouch that is weird :/
Since you have PHP 5.5 I guess running php -S localhost:8000
should work? Or maybe it's the localhost
that Ubuntu might not like, maybe php -S 127.0.0.1:8000
should be better?
For the address not being displayed maybe it comes from https://github.com/CouscousPHP/Couscous/blob/master/src/Command/PreviewCommand.php#L121
The argument doesn't have a value, even if it's supposed to have a default value. Maybe the issue come from it.
And for the php -S thing I don't really know how it works so I cannot help on that side.
Yep that's weird since as you said there is a default value
I tried with a Vagrant box running latest Ubuntu and it's working for me.
Just to be sure:
php -S localhost:8000
work?php couscous.phar preview 127.0.0.1:8000
work?does php -S localhost:8000 work?
When I access the url I get a 404.
does running php couscous.phar preview 127.0.0.1:8000 work?
It's working like this. So there mey be an issue with the default value for the address. I also get the address display in the console.
OK the 404 is normal I guess because there is no index.html in the directory, but it's just to make sure the command runs.
Cool so maybe localhost
is causing problems (I hope that's it), I'll replace it with 127.0.0.1
and we'll se how it goes.
I've pushed and re-generated the phar!
Thanks for your help, hopefully that will work!
If I launch php couscous.phar preview localhost:8000
it's working too.
I just found the issue. And it was me.
I wrote php couscous.phar preview .
so for the command the address was the dot I put at the end of the command. I thought the dot was for the path where files will be generated.
Launching the command php couscous.phar preview
without the dot is working and displaying the address. It was displaying the address earlier, but as it was the dot I thought the dot was the end of the sentence.
Removing the dot at the end of the command in the website could be a good idea. You put a dot for the second but not for the first.
Ah yeah good catch! I'll remove it from the website thanks :)
Preview features seems to be broken.
I launched it as said on the website:
Here is what I get:
I don't have any address to look at, and http://localhost:8000/ is not accessible either.