View previous topic :: View next topic |
Author |
Message |
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3551
|
Posted: Tue Feb 26, 2013 11:59 pm Post subject: [SOLVED]: LAMP does not work |
|
|
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 |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Wed Feb 27, 2013 2:25 am Post subject: |
|
|
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 then Code: | /etc/init.d/apache2 restart |
_________________ Defund the FCC. |
|
Back to top |
|
|
wjb l33t
Joined: 10 Jul 2005 Posts: 600 Location: Fife, Scotland
|
Posted: Wed Feb 27, 2013 7:46 pm Post subject: |
|
|
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 |
|
|
ONEEYEMAN Advocate
Joined: 01 Mar 2005 Posts: 3551
|
Posted: Wed Feb 27, 2013 9:00 pm Post subject: |
|
|
DONAHUE,
Yes, I added "-D PHP" and that fixed it.
Thank you. |
|
Back to top |
|
|
|
|
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
|
|