Go Back   Computer Forums > General Computing > Hardware
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 06-18-2009, 08:57 PM   #1
Baseband Member
 
Join Date: May 2009
Posts: 79
Default Apache2 problems on Ubuntu

How do I get php working with Apache on Ubuntu 8.04 Live? I did:
#apt-get install apache2
#apt-get install php5

But it just prompts to download all php files in /var/www -- it sends the wrong file type. Same with image and media files. I cannot stop apache2 either. It gives an error message whenever I run the apache control command. Is there a way of editing the config file to correct the file types and then sending some sort of signal to apache to make it restart?
__________________

iPat is offline   Reply With Quote
Old 06-18-2009, 11:01 PM   #2
Daemon Poster
 
wmorri's Avatar
 
Join Date: May 2007
Posts: 1,066
Send a message via AIM to wmorri
Default Re: Apache2 problems on Ubuntu

Hi,

Apache should be installed already when you install Ubuntu. I would like to see the error that you are getting when you try and install them. I would make sure that you system is up-to-date, too.

Cheers!
__________________

__________________
LEARN BY DOING NOT BY FOLLOWING DIRECTIONS!
Linux Forever!

I thought you were a hispanic/african american? Who is the white guy in the pictures?
wmorri is offline   Reply With Quote
Old 06-18-2009, 11:28 PM   #3
Fully Optimized
 
vampist's Avatar
 
Join Date: Oct 2008
Location: USA
Posts: 2,404
Default Re: Apache2 problems on Ubuntu

Quote:
Originally Posted by wmorri View Post
Hi,

Apache should be installed already when you install Ubuntu. I would like to see the error that you are getting when you try and install them. I would make sure that you system is up-to-date, too.

Cheers!
On ubuntu desktop 8.04? Lol? I don't believe so.
I'm running an ubuntu server and it wasn't..

You said ubuntu live.. Are you trying to do this on a live cd?!

I would suggest two things. Get 9.04 server edition, install that.
Then try and set everything up from there.
__________________
Everyone's Favorite Turd xD
ET: "Phone home!"
Geek: "ping 127.0.0.1"

"If that guy knew half the $h*t that I know, his fuzzy little head would explode. " - Matthew Farrell
vampist is offline   Reply With Quote
Old 06-18-2009, 11:49 PM   #4
Daemon Poster
 
wmorri's Avatar
 
Join Date: May 2007
Posts: 1,066
Send a message via AIM to wmorri
Default Re: Apache2 problems on Ubuntu

Wow I must be tired. I apparently need to read the entire post before I comment.
__________________
LEARN BY DOING NOT BY FOLLOWING DIRECTIONS!
Linux Forever!

I thought you were a hispanic/african american? Who is the white guy in the pictures?
wmorri is offline   Reply With Quote
Old 06-19-2009, 05:24 AM   #5
j03
~~~~~~~~
 
Join Date: Jan 2005
Location: Wales
Posts: 5,556
Send a message via MSN to j03
Default Re: Apache2 problems on Ubuntu

Haha, if i'm in a rush and need to get it installed, i just run:
Code:
sudo apt-get install phpmyadmin
That automagically get's PHP, mySQL and Apache2, and configures them.

I'm running lighttpd, myself!
j03 is offline   Reply With Quote
Old 06-20-2009, 09:05 PM   #6
Baseband Member
 
Join Date: May 2009
Posts: 79
Default Re: Apache2 problems on Ubuntu

OK so I tried
sudo apt-get install phpmyadmin --fix-missing

And it installed Apache. Perhaps also php and mysqld. But php files still don't work. The browser downloads the source code instead. Images, movies, and audio files are similarily treated incorrectly. I cannot modify the config file and restart apache, because apache refuses to restart. When I type:
apache2 -k restart

It says:
apache2: bad user name ${APACHE_RUN_USER}
-------------

EDIT:
Well I finally figured out how to stop and restart it.
#killall apache2
#/etc/init.d/apache2 start

I wonder why the other way didn't work?!?
But the file types are still setup incorrectly.

Things seem to have improved slightly when I changed

DefaultType from text/plain to application/octet-stream

PHP files now seem to work properly.
However, most files that I try to download or open in the browser are 0 bytes long, like png files

EDIT:
I also tried to add the line
AddType image/png .png

to the apache2.conf file, but it seems to have no effect.

---------------
EDIT:
Well, now php is working. But installing phpmyadmin did not install mysqld. Images still do not work.
__________________

iPat is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 10:14 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0