4

Up until now the apache50 in de CS50 IDE was running perfectly. Suddenly when I want to start apache50 the message: [sudo] password for ubuntu: is shown in the terminal.

enter image description here

What password should I enter here. Besides entering some passwords I have already tried to logout and restart the IDE.

Any help is appreciated. can't continue work:-(

1
  • Same problem here! Just now this problem started! apache50 stop also attracts the same problem! However, running "mysql50 start" on terminal doesn't ask for a password but phpmyadmin doesn't open (Displays - No Application seems to be running) Waiting for an answer!
    – Arshad
    Commented Dec 21, 2016 at 13:51

4 Answers 4

4

The root cause is a Cloud9 change, github bug to track here: https://github.com/cs50/ide50/issues/27

DinoCoderSaurus's workaround should work until they update the cs50 ide.

Also: you should learn to use vi! Simple steps for this case:

  • $ sudo vi /usr/bin/apache50
  • press 'i' to enter Insert mode
  • make your changes (using the arrow keys to navigate)
  • press Esc to exit Insert mode
  • type :wq and then hit enter to save and quit
2
  • Thanks mate! Ya, I didn't know to use vi!
    – Arshad
    Commented Dec 21, 2016 at 15:55
  • Thank you! I didn't know vi either. Gonna dive into this. the steps you described helped met to execute the workaround @DinoCoderSaurus suggested. Commented Dec 21, 2016 at 21:33
10

Apologies for the inconvenience! Should be fixed ASAP! But until it's fixed, yet another solution to this is to execute:

$ echo "#includedir /etc/sudoers.d" | sudo tee -a /etc/sudoers

in a terminal tab, and restarting all terminal sessions, by right-clicking inside a terminal and choosing Restart All Terminal Sessions. Then, try executing the apache50 command again as usual!

If you restart your workspace, you'll need to repeat that!


Update: We've pushed a fix to this problem. It shouldn't exist anymore if you run update50.

2
  • Thx, it worked! Commented Dec 21, 2016 at 16:57
  • Would be helpful if you tell what does the command do.
    – azmain
    Commented Dec 21, 2016 at 18:55
6

UPDATE 24-Dec-2016: As of IDE version 94, this has been fixed.

Suspect some cloud9 change. For the "more comfortable", a patch is needed in apache50 script. You need elevated permissions. (I used sudo vi /usr/bin/apache50)

change line 21 in /usr/bin/apache50 from
apache="sudo -S -u www-data service apache2"

to
apache="sudo sudo -S -u www-data service apache2"

Got the idea from this post in C9 community.

If you don't use vi you could try (from your home directory):

$ sudo cp /usr/bin/apache50 ./
$ sudo chown ubuntu:ubuntu apache50
edit apache50
$sudo cp apache50 /usr/bin/apache50

3
  • Thanks a lot! But please tell me how do we save changes?
    – Arshad
    Commented Dec 21, 2016 at 15:39
  • see edited answer Commented Dec 21, 2016 at 15:42
  • @DinoCoderSaurus, I have no permission to execute that last line. Would this be a one time action if it worked? Commented Dec 21, 2016 at 16:53
1

All you need is "update50" then be happy! :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .