Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSean Flanagan
33,235 PointsUsing the terminal
Hi.
Sorry to have to start two threads on the same video but I'm stuck again.
I've watched 2 minutes of this video. When I typed sudo vi
in the terminal, I got a message:
sudo is not recognised as an internal or external command, operable program or batch file.
I'd appreciate any help please.
7 Answers
Alena Holligan
Treehouse TeacherOn windows, notepad is probably the easiest. You can open notepad first then choose File > Open or copy the path and open a terminal window, example
notepad C:\MAMP\conf\php7.0\php.ini
Alexander Davison
65,469 PointsIt seems that you are using Windows. The Windows command prompt isn't the same as *nix and Mac systems' command prompts, and its commands are quite different.
Sean Flanagan
33,235 PointsHi Alexander. Thanks for your help.
What should I do then, please?
Cheers
Sean Flanagan
33,235 Points"Loaded configuration file: C:\MAMP\conf\php7.2.1\php.ini" Is that it?
Sean Flanagan
33,235 PointsGot it. Thank you. My servers are running but I have a white screen saying the localhost page can't be found.
Alena Holligan
Treehouse Teachertry adding the port? so http://localhost:8888
Or try from MAMP "Open WebStart page"
Sean Flanagan
33,235 PointsHi Alena.
Apologies for previous delays. Unfortunately I suffered an asthma attack last week so the last few days have been very stressful for me and this problem has had to take a back seat, so I appreciate your patience throughout this difficult time.
Right, I've clicked the link to the port and I got a white screen with the text "Test Website 2". How am I doing so far?
Alena Holligan
Treehouse TeacherSounds like it's working, as long as Test Website 2 is what you expected? If not you may need to go into Preference > Web Server and check that the Document Root is pointed to the correct folder
Sean Flanagan
33,235 PointsI'm not sure what I was supposed to expect. Test Website 2 came from your workshop Windows: Local PHP Environment.
https://teamtreehouse.com/library/windows-local-php-dev-environment
https://teamtreehouse.com/library/setup-your-local-development-environment
Alena Holligan
Treehouse Teacheryou should be good then, I just wanted to make sure you were getting what you expected. You could be showing something else if the folder wasn't linked properly
Sean Flanagan
33,235 PointsThank you! :-)
Sean Flanagan
33,235 PointsSean Flanagan
33,235 PointsHi Alena.
Thanks for your response.
I got as far down the path as
conf
but when I typedcd php7.0
the system couldn't find the path.Vis-a-vis Notepad++, I've opened index.php and it says "Test" as of when I last used it.
Alena Holligan
Treehouse TeacherAlena Holligan
Treehouse TeacherStep 1: While your server is running, go to the phpinfo file in a browser I'm using http://localhost/phpinfo.php
Step 2: Search for “php.ini”. You should see something like “Configuration File (php.ini) Path”. Examples:
C:\MAMP\conf\php7.0