Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-12-2004, 05:29 AM   #1
Registered: Dec 2004
Posts: 81

Rep: Reputation: 15
Help!!! desperate noob in Apache/php/MySQL (Triad)

Will you guys give me a hand for setting up a web server??? I'm cracking this for about a week and 2 re-install of OS with no progress.

First of all, I'm in the University with a static IP which is behind a firewall. The OS is RHLE AS 3.0 (Taroon Update 3) with 2 Lan Card. The Eth0 is disabled (Inactive) no ip setting while the Eth1 is Active and configured at:

Primary DNS:

I can browse the internet using proxy server settings with latest Firefox & Mozilla.

I have done the following:

1) Update RHLE's MySQL from 3 to 4 by following exact instruction here:

Download MySQL 4.1.x Source

Invoke the following:

# rpm -ivh MySQL-4.1.7-0.src.rpm ----> /usr/src/redhat/SOURCES

download the & my.cnf-def -----> /usr/src/redhat/SOURCES
download mysql4.1.specs -----> /usr/src/redhat/SPECS

Invoke the following:

# rpmbuild -ba mysql4.1.specs

After an 1 hour & half of compiling...I got my own MySQL installation with no reported problem.

download mysql- ------> /usr/src/redhat/SOURCES
download MySQL-shared-compat.spec ------> /usr/src/redhat/SPECS

Invoke the following:

# rpmbuild -ba MySQL-shared-compat.spec

Now went to /usr/src/redhat/RPMS/i386

Invoke the following:

# rpm -Uvh --force mysql-shared-compat-3.23.58-9.i386.rpm mysql-server-4.1.7-OFC2.i386.rpm mysql-client-4.1.7-0FC2.i386.rpm

after a succesfull update.

Edited the following "/etc/" to add this line


Then Invoke the following to start mysql daemon:

# service mysql start

2) Installing Apache:

Download httpd-2.0.52.tar.gz

Invoke the following:

# tar -xvzf httpd-2.0.52.tar.gz
# mv httpd-2.0.58 /usr/src/httpd-2.0.52
# mkdir /usr/local/apache2

Went to -----> /usr/src/httpd-2.0.52

Invoke the following:

# ./configure --prefix=/usr/local/apache2 --enable-module=so
# make
# make install

After that done the following:

# /usr/local/apache2/bin/httpd -v

With the following output:

Server version: Apache/2.0.52
Server built: Dec 10 2004 16:00:03

After that I have edited the "/usr/local/apache2/conf/httpd.conf" add/modify the following:

"ServerAdmin" =
"ServerName" =
"UseCanonicalName" = On
"Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews"
"AllowOverride Options FileInfo AuthConfig Limit"
"DirectoryIndex index.html index.html.var" to "DirectoryIndex index.html index.html.var index.shtml index.cgi index.php index.phtml index.php3 index.htm home.html welcome.html"

"AddType application/x-httpd-php .php .phps .php3 .phtml .html .htm .shtml .fds"
"AddHandler cgi-script .cgi .pl"

Then copy favicon.ico "cp favicon.ico /var/www/html"

After that, went to "System Settings" > "Security Level" > and checked for "WWW (HTTP) & Eth1 " in the "Trusted services". After that restarted my computer.

Thanks to this site

After a successful restart, I have Invoke the following:

# /usr/local/apache2/bin/apachectl start
# ps auxw|grep httpd

Has the following output:

root 1292 0.1 1.4 9924 3596 ? S 15:10 0:00 /usr/local/apache2/bin/httpd -k start
nobody 1293 0.0 1.4 9924 3616 ? S 15:10 0:00 /usr/local/apache2/bin/httpd -k start
nobody 1294 0.0 1.4 9924 3616 ? S 15:10 0:00 /usr/local/apache2/bin/httpd -k start
nobody 1295 0.0 1.4 9924 3616 ? S 15:10 0:00 /usr/local/apache2/bin/httpd -k start
nobody 1296 0.0 1.4 9924 3616 ? S 15:10 0:00 /usr/local/apache2/bin/httpd -k start
nobody 1297 0.0 1.4 9924 3616 ? S 15:10 0:00 /usr/local/apache2/bin/httpd -k start
root 1301 0.0 0.2 3680 684 pts/0 S 15:11 0:00 grep httpd

Launch firefox or mozilla..configure my connection to "No Proxy http://localhost/,"

Put the address "http://localhost/" and firefox says "The connection was refused when attempting to contact". If I put the following address "" it resulted to a window that says

"You have chosen to open which is a: application/x-httpd.php from what should firefox do with this file: Open or Save to Disk"

Now if I try to put firefox to Manual Proxy Setting with "No Proxy http://localhost/," and try to put "http://localhost/", I get the message:

The requested URL could not be retrieved
While trying to retrieve the URL: http://localhosts/
The following error was encountered:

Unable to determine IP address from host name for localhosts

The dnsserver returned:

Name Error: The domain name does not exist.

This means that:
The cache was not able to resolve the hostname presented in the URL.
Check if the address is correct.
Your cache administrator is
Generated Sat, 11 Dec 2004 07:10:20 GMT by (squid/2.5.STABLE4)

If I put the following address "" it resulted to a window that says

"You have chosen to open which is a: application/x-httpd.php from what should firefox do with this file: Open or Save to Disk" Same as without proxy setting connection.

Now i'm lost, no apache web!!! anyway I went ahead with PHP.

3) Install PHP to hope that it will resolve the problem.

download php-5.0.2.tar.gz

Invoke the following:

# tar -xvzf php-5.0.2.tar.gz
# mv php-5.0.2 /usr/src/php-5.0.2
# mkdir /usr/local/php
# cd /usr/src/php-5.0.2
# ./configure --prefix=/usr/local/php --with-mysql --with-apxs2=/usr/local/apache2/bin/apxs
# make
# make install
# cd /libs
# cp /usr/local/apache2/modules/

Double check the "/usr/local/apache2/conf/httpd.conf" has the following lines:

LoadModule php5_module modules/

Check the "/usr/local/apache2/logs/error_logs" and has an entry:

[notice] Apache/2.0.52 (Unix) PHP/5.0.2 configured -- resuming normal operations

Now to test the installation:
Created a the following:

# gedit phpinfo.php


then save it at "/var/www/html"
Launch Firefox, done the File > Open File >

Went to "/var/www/html/phpinfo.php" and returned a blank page!!!.

Were did I do wrong ???

I also want to inquire about this problem:

In my 1st installation I manage to "telnet" and tried to invoke the following:


The output of this is that "No Permision" or something along that line.

Now my 2nd Installation when I "telnet"...I get a reply that "Unknown Host"

I remembered that I have set the following in my 2nd installation. Create the following files in "/etc/profile.d" directory:

export http_proxy=
export ftp_proxy=
export HTTP_PROXY=
export FTP_PROXY=

#gedit proxy.csh
setenv http_proxy
setenv ftp_proxy
setenv no_proxy
setenv FTP_PROXY

I want to verify the following:

What will I put in the "export" & "setenv no_proxy". Is it the static IP Address "" or the "host name" which is "rsbs" of the machine that I named to when I installed the OS?

Thank you very much for the assistance.

Last edited by backroger; 12-12-2004 at 05:58 AM.
Old 12-15-2004, 07:27 AM   #2
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403

Rep: Reputation: 30
# gedit phpinfo.php


then save it at "/var/www/html"
Launch Firefox, done the File > Open File >

Went to "/var/www/html/phpinfo.php" and returned a blank page!!!.
you can't open PHP pages directly in your browser, they must be parsed by PHP. when installing php in the apache enviroment, you can open the php file in firefox with: "" address. apache will make PHP parse the file (if correctly installed). if you get the "do you want to save this file?" dialog, apache works, but it doesn't make PHP parse the file, so PHP isn't installed correctly in the apache environment. apache needs to know how to handle PHP files (let them parse by PHP), wich is done using mime types, see configuration file /usr/local/apache2/conf/mime.types (i guess this is the file on your system). also, an apache PHP module must be loaded. this is done at the main configuration file (/usr/local/apache2/conf/httpd.conf), see the addModule and loadModule directives (there are more of them in the config file).

hope this helps,
.-=~ iluvatar ~=-.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help!!! desperate noob in Apache/php/MySQL (Triad) backroger Linux - Software 0 12-11-2004 08:37 AM
Please someone help a noob! I'm desperate nastynas Linux - Software 4 10-26-2004 11:47 PM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 09:59 PM
php-nuke with apache php mysql c0c0deuz Linux - Software 0 03-30-2003 07:23 AM
nooB ?, install: apache, PHP, postgreSQL and wine mrMahann Linux - Software 4 08-28-2002 01:28 AM

All times are GMT -5. The time now is 12:43 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration