how to use php CLI (command line interface) when using a vagrant box

20 views
Skip to first unread message

paul kendal

unread,
Apr 7, 2017, 6:27:58 AM4/7/17
to Vagrant
hi

i am new to using vagrant box 

i install this vagrant image from  the following:   


this give me the following;


  • Ubuntu 14.04 + Apache2 + Php5 + MySQL 5.5.x

i now want to access my php from my windows command line (i am using cygwin) -however i don't know how to access the php files.

i tried doing this from with the folder 

<? php echo "testing ";  ?> 



but got the following message: 

-bash: ?: No such file or directory


would appreciate some advice 

Alvaro Miranda Aguilera

unread,
Apr 7, 2017, 8:23:17 AM4/7/17
to vagra...@googlegroups.com

On Fri, Apr 7, 2017 at 12:27 PM, 'paul kendal' via Vagrant <vagra...@googlegroups.com> wrote:
<? php echo "testing ";  ?> 

try

vagrant ssh
cd /vagrant
mkdir test
cd test
echo '<? php echo "testing ";  ?> ' > testing.php

php testing.php

Alvaro.


--
Alvaro

Reply all
Reply to author
Forward
0 new messages