1

After working on pset7 for about a month now. I have reached a position where I thought that I was making some progress. However, it wasn't to be. When I logged on to my IDE and tried to load phpMyAdmin I got the following error message.

enter image description here

I've lost all of the information in the phpMyAdmin database which is linked to my files for pset7 and it is very frustrating after spending so much time on this. I suspect that one or more of the phpMyAmin files have been corrupted in my IDE but I don't know where to begin to repair the damaged files. Can someone out there please help? I want to continue and finish CS50 but I am starting to lose faith!

3 Answers 3

1

Frustrating, yes. But you probably haven't lost your database. Check out @Matt Obert's advice here. And maybe an update50 is in order. The IDE is on version 71.

2
  • 1
    I tried update50 and then restarted mysql50. Now I seem to have a problem with apache, which is giving me the following error message: ` * Restarting web server apache2 (13)Permission denied: AH00058: Error retrieving pid file /home/ubuntu/lib/apache2/run/apache2.pid AH00059: Remove it before continuing if it is corrupted. Action 'start' failed. The Apache error log may have more information.` Sep 14, 2016 at 10:54
  • 1
    I noticed that the new apache50 start command will first stop any running apache server (or try to). I have not gotten that error, here's the sequence I would try. apache50 stop, apache50 start -root-. If that does not work, you will need to look in the error log as indicated. the error log is a text file and is found at $HOME/lib/apache2/log/error.log. (BTW $HOME is /home/ubuntu). Sep 14, 2016 at 12:05
1

After searching the internet for solutions I finally got phpMyAdmin up and running again by switching versions, in the hope that this would solve the problem, and back again and then installing the mysqli extension by doing the following:

sudo add-apt-repository ppa:ondrej/php

then: sudo apt-get update

and: sudo apt-get install php5.6 php7.0

Then I switched php versions from 5 to 5.6 using:

sudo a2dismod php5

and: sudo a2enmod php5.6

followed by: sudo service apache2 restart

Then I installed the mysqli extension: extension=mysqli.so

I then tried to open phpMyAdmin under version php5.6 but it would not open, so I switched back to version php5 again and then opened phpMyAdmin and it worked! It was more of a trial and error process for me put perseverance seems to have paid off. You were right, my original SQL database is still intact.

0

Take heart! Even if you lose phpMyAdmin completely, your mySQL databases are probably fine.

You can verify that by following my instructions over here. (This is a direct link to my answer in the same thread @DinoCoderSaurus linked to earlier.)

But first, let's fix Apache2.

I'm on mobile and haven't tested your scenario with the latest version of CS50 IDE, but your error message does tell you where the stale .pid file is, so you could try nuking it with:

rm /home/ubuntu/lib/apache2/run/apache2.pid 

If that doesn't work, you might need to sudo it:

sudo rm /home/ubuntu/lib/apache2/run/apache2.pid 

Hope this helps!

EDIT2: Please create a new question for the new error message:

Fatal error: CS50 Library requires bcmath or gmp extension module in /home/ubuntu/workspace/pset7/vendor/library50-php-5/CS50/CS5‌​0.php on line 48. 

It's not related to your earlier issues, which are resolved.

Also, it sounds like a new and serious issue. If other people need to find the answer to this new issue, they are unlikely to find it buried in the comments to an unrelated question.

5
  • Using your advice I've restarted apache2 but now I'm getting the following error message: Fatal error: CS50 Library requires bcmath or gmp extension module in /home/ubuntu/workspace/pset7/vendor/library50-php-5/CS50/CS50.php on line 48. When I try to access the Web Server. Sep 14, 2016 at 15:07
  • new error message question created. Sep 14, 2016 at 18:10
  • New error message question created. Sep 14, 2016 at 18:11
  • Cool, I am looking at your other question. I just ran update50 and I can't get phpMyAdmin to work right now either. Please follow my advice here and verify that your pset7 database and tables are intact! If they are, you can always back them up using mysqldump and start again in a fresh IDE if necessary. But don't do anything hasty like deleting anything you've done -- we should be able to save everything. Sep 14, 2016 at 19:49
  • I have not been able to duplicate your mysqli extension missing bug, but I did manage to get phpMyAdmin working with version 71 of the CS50 IDE. Here's how. Let me know if that works for you, or if you are still stuck. Sep 15, 2016 at 22:16

You must log in to answer this question.

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