0

Hello fellow linuxers:

I would like to link my laptop to my Android phone and Android tablet, which hasn't been possible via bluetooth or directly through USB / mini-USB ports.

A friend on another linux forum advised me to install a LAMP server and using instructions from around the 'net I got the Apache server working ... for a while.

I got to the point where I could get Firefox to display the Apache test page, but since attempting to install the remaining components of the LAMP stack (MySql and PHP), the Apache bit I had going has stopped working.

I am troubleshooting apache2, because I get the following error message when I try to run Apache from the Terminal:

  • Restarting web server apache2 [fail]
  • The apache2 configtest failed.

Output of config test was:

apache2: Syntax error on line 222 of /etc/apache2/apache2.conf: Could not open configuration file /etc/phpadmin/apache.conf: No such file or directory Action 'configtest' failed.

Now I am confused, because as well as not really understanding the concept of a LAMP stack to begin with, I think I took too many different bits of advice on how to install it.

I don't know how to fix line 222, but I think the problem is because I altered some of the apache files, following advice in this article.

I was also taking tips from here.

Please can anyone tell me how I get apache working again, or whether I need to reinstall it?

I will be grateful enough to offer praise and prayers to Jesus for your health and well-being, even if you are just reading this.

:-D

6
  • Please share the logs details for Apache from /var/log/apache2/error.log Jan 5, 2016 at 10:13
  • I already told you step by step how to fix the line 222, is that difficult to read?
    – ostendali
    Jan 5, 2016 at 11:36
  • Hi incBrain, thanks for editing my question, which I admit I wrote in a rush. Jan 7, 2016 at 12:16
  • Hi Ramesh Chand. I only just saw your request for logs details. I have little understanding of programming, but I am guessing you were very kindly offering to undertake a laborious code-crunching chore on my behalf. I don't discount the possibility that doing so might prove in some way enjoyable or beneficial to your good self, but thanks so much for offering to do this, whether or not it is from pure or applied altruism. I have some other answers to sort through to see whether I can fix the error without needing to waste your time on this error log but I may take you up on your offer. HUGS ! Jan 7, 2016 at 12:22
  • Dear ostendali, I only just saw your blunt comment. Were you being rude? I didn't check back for answers until now, which is only 2 days and I haven't yet seen that, as you assert, you have already answered my question. Thank you in retrospect if indeed you have and I accept that if you are used to fellow Stack Exchange members working to a rapid-response time frame you might have considered my own delay in replying to be rude. For some reason my phone's email notifications didn't pick up the replies I've had. Please forgive any misunderstanding, as I forgive you and THE LORD forgiveth all. Jan 7, 2016 at 12:22

3 Answers 3

2

The answer to your question is posted by yourself:

The apache2 configtest failed. Output of config test was: apache2: Syntax error on line 222 of /etc/apache2/apache2.conf: Could not open configuration file /etc/phpadmin/apache.conf: No such file or directory Action 'configtest' failed.

In particular:

error on line 222 of /etc/apache2/apache2.conf

If you go on that line you will notice that it is looking for:

/etc/phpadmin/apache.conf

And as Redfeather suggested in his reply, such file doesn't exist.

I am not really sure what exactly you are trying to do with your tablet and android, beside the mysterious plan the solution to your problem is to open:

/etc/apache2/apache2.conf

And then go to line 222 and comment out the line with "#" then restart apache. Or alternatively create the file that it is looking for.

Basic steps about how to edit and comment out offending line:

From the command line perform (as root user):

vi /etc/apache2/apache2.conf

You are basically opening a file with "vi" editor. Once you are in the editor type ":222" (without quotes).

This will take you to the line number 222.

Once you are in the desired line just type "i#" (without quotes, make sure you add # at the beginning of the line) and then "ESC" key from your keyboard followed by ":wq" (without quotes) and then restart your apache

If you don't have enough knowledge on setting up apache you better start to have some readings because you will have lots of other troubles and honestly it is not the best thing to ask on forums where anything comes up during any stage of set-up. Simply because there are thousands of How-To's.

here for your convenience have some reading to increase your knowledge:

https://help.ubuntu.com/community/ApacheMySQLPHP

PS: I am wondering how you set it up an apache server without even knowing how to edit a file using a simple editor?

Good luck!!!

3
  • Dear ostendali. You are erudite as well as generous. I believe I have wrongfully been offended by your comment further up the thread. I didn't know the threads have the earlier comments at the bottom, but my ignorance is a poor excuse. I take back my disgruntledness at your impatience in hearing back from me. Your answer looks perfect in solving my problem, except that at this precise moment my incredibIy limited Command Line skills aren't allowing me to edit line 222 at all. I like your description of a "mysterious plan", which flatters my ego as it is very James Bond villain-ish. Jan 7, 2016 at 12:51
  • all you need to do is to use vi editor, I have edited the question to suite your need as I can see your knowledge in linux is extremely basic.
    – ostendali
    Jan 7, 2016 at 14:54
  • Apparently I should not be using these comments to say things like "thanks", but only to suggest improvements, ostendali, so in lieu of the gratitude I would otherwise give, askubuntu advises me to suggest an improvement. Now, as you have noted my knowledge of linux "is extremely basic", I have little knowledge to use as gratefulness currency and there4 the best i can do is to tell U I used a google chromebook yesterday and can recommend such a thing, even though google as a corporate entity don't really need my endorsements ;0) Mar 12, 2016 at 10:51
1

Apache can't find the /etc/phpadmin/apache.conf file. So what I would start with is disabling the PhpMyadmin part of your apache configuration.

2
  • Is this an answer? If you think this would fix the issue, please include steps to "disabling the PhpMyadmin part of your apache configuration" also please click the help in the top right and take the tour and read how to write a good answer, for some tips on content.
    – Mark Kirby
    Jan 5, 2016 at 11:04
  • Thanks you Redfeather. That sounds like good advice to me, but as mark kirby astutely guessed by reading between the lines I am indeed lacking in the skills to disable the PhpMyadmin part. My next step is to scroll up the thread again, check for more tips (I am commenting on answers as I read them), test them and re-apportion thanks where appropriate :) Jan 7, 2016 at 12:40
0

You are posted on line 222 of /etc/apache2/apache2.conf

If you can post the file.

My confident you might be change the config file as wrong. otherwise you linked with some folder with like a host.

first post the config file or snap through it. we should fix the error finial. 
1
  • Thanks for your help mahendra. Your good intentions have been noted and will hopefully be rewarded by the will of God, the laws of karma, or some other nice process. Unfortunately I cannot fully understand your written English, but I am sure your English is good enough in general. It is certainly better than my writing in any other language, especially in code and admittedly my own written English approaches being incomprehensible when I am in a rush and fffforget that the "F" key on my laptop is missing dfue to my own carelessness. Mad Love! Jan 7, 2016 at 12:45

You must log in to answer this question.

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