Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]: LAMP does not work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2049

PostPosted: Tue Feb 26, 2013 11:59 pm    Post subject: [SOLVED]: LAMP does not work Reply with quote

Hi, ALL,
I am trying to run the LAMP stack and here is my problem,

I successfully installed Apache, mySQL and PHP on the machine, but trying to open the PHP script from the "/var/www/htdocs/mysite" in ther browser I am getting "Which program needs to open the file?" dialog.

Here is the installation:

Code:


LearningRight htdocs # emerge -pv php

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] dev-lang/php-5.4.8:5.4 [5.4.6:5.4] USE="apache2 berkdb bzip2 cli crypt c
type exif fileinfo filter gd gdbm hash iconv ipv6 json ldap mysql mysqli nls phar posix r
eadline session simplexml spell ssl tokenizer truetype unicode xml zlib -bcmath -calendar
 -cdb -cgi -cjk -curl -curlwrappers -debug -doc -embed -enchant -firebird -flatfile -fpm
(-frontbase) -ftp -gmp -imap -inifile -intl -iodbc -kerberos (-kolab) -ldap-sasl -libedit
 -mhash -mssql -mysqlnd -oci8-instant-client -odbc -pcntl -pdo -pic -postgres -qdbm -reco
de (-selinux) -sharedmem -snmp -soap -sockets -sqlite3 (-sybase-ct) -sysvipc -threads -ti
dy -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -zip" 10,797 kB

Total: 1 package (1 upgrade), Size of downloads: 10,797 kB

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


Code:


LearningRight htdocs # emerge -pv mysql

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] dev-db/mysql-5.1.67 [5.1.62-r1] USE="berkdb big-tables community perl ss                                                                  l -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal -pbxt -profiling (                                                                  -selinux) -static {-test} -xtradb" 26,055 kB

Total: 1 package (1 upgrade), Size of downloads: 26,055 kB

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


Code:
LearningRight htdocs # emerge -pv apache

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] app-admin/apache-tools-2.2.23 [2.2.22] USE="ssl" 5,357 kB
[ebuild     U  ] www-servers/apache-2.2.23:2 [2.2.22-r1:2] USE="ldap ssl -debug -doc (-se                                                                  linux) -static -suexec -threads" APACHE2_MODULES="actions alias auth_basic authn_alias au                                                                  thn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz                                                                  _host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir dis                                                                  k_cache env expires ext_filter file_cache filter headers include info log_config logio me                                                                  m_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir use                                                                  rtrack vhost_alias -asis -auth_digest -authn_dbd -cern_meta -charset_lite -dbd -dumpio -i                                                                  dent -imagemap -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp                                                                   -proxy_http -proxy_scgi -reqtimeout -substitute -version" APACHE2_MPMS="-event -itk -peru                                                                  ser -prefork -worker" 63 kB

Total: 2 packages (2 upgrades), Size of downloads: 5,420 kB

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.



Code:

LearningRight htdocs # cat /etc/conf.d/hostname
# Set to the hostname of this machine
hostname="LearningRight"
LearningRight htdocs # cat /etc/hosts
# /etc/hosts: Local Host Database
#
# This file describes a number of aliases-to-address mappings for the for
# local hosts that share this file.
#
# In the presence of the domain name service or NIS, this file may not be
# consulted at all; see /etc/host.conf for the resolution order.
#

# IPv4 and IPv6 localhost aliases
127.0.0.1       LearningRight   localhost
::1             localhost

#
# Imaginary network.
#10.0.0.2               myname
#10.0.0.3               myfriend
#
# According to RFC 1918, you can use the following IP networks for private
# nets which will never be connected to the Internet:
#
#       10.0.0.0        -   10.255.255.255
#       172.16.0.0      -   172.31.255.255
#       192.168.0.0     -   192.168.255.255
#
# In case you want to be able to connect directly to the Internet (i.e. not
# behind a NAT, ADSL router, etc...), you need real official assigned
# numbers.  Do not try to invent your own network numbers but instead get one
# from your network provider (if any) or from your regional registry (ARIN,
# APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#

Should I do something more in order to run the LAMP scripts? Did I miss configuration step?

Thank you.


Last edited by ONEEYEMAN on Wed Feb 27, 2013 9:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6415
Location: Goose Creek SC

PostPosted: Wed Feb 27, 2013 2:25 am    Post subject: Reply with quote

Quote:
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5" Did you add -D PHP5 to this line in /etc/conf.d/apache2 ?

in /etc/portage/package.use: dev-lang/php apache2 mysql then
Code:
emerge php
then
Code:
 /etc/init.d/apache2 restart

_________________
Defund the FCC.
Back to top
View user's profile Send private message
wjb
Guru
Guru


Joined: 10 Jul 2005
Posts: 352
Location: Fife, Scotland

PostPosted: Wed Feb 27, 2013 7:46 pm    Post subject: Reply with quote

You do need to do some configuration to make them do anything usueful. Take a look in the gentoo wiki - for apache and mysql.
Back to top
View user's profile Send private message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 2049

PostPosted: Wed Feb 27, 2013 9:00 pm    Post subject: Reply with quote

DONAHUE,
Yes, I added "-D PHP" and that fixed it.

Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum