LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-12-2004, 04:29 AM   #1
backroger
Member
 
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 10.66.1.2 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:

IP: 10.66.1.2
Netmask: 255.255.0.0
Gateway: 10.66.255.254
Primary DNS: 10.0.1.1

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 mysql.in & 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-3.23.58.9.i386.rpm ------> /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/ld.so.conf" to add this line

/usr/lib/mysql

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" = backroger@gmail.com
"ServerName" = 10.66.1.2:80
"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 http://stanton-finley.net/fedora_co..._notes.html#Web

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/, 10.66.1.2"

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

"You have chosen to open which is a: application/x-httpd.php from http://10.66.1.2/ 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/, 10.66.1.2" 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 admin@ateneo.edu.
Generated Sat, 11 Dec 2004 07:10:20 GMT by proxy3.admu.edu.ph (squid/2.5.STABLE4)
----------------------------

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

"You have chosen to open which is a: application/x-httpd.php from http://10.66.1.2/ 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!!!..so 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 libphp5.so /usr/local/apache2/modules/

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

LoadModule php5_module modules/libphp5.so

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

<?
phpinfo();
?>

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 10.66.1.2:80" and tried to invoke the following:

HEAD / HTTP/1.1

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

Now my 2nd Installation when I "telnet 10.66.1.2:80"...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:

#gedit proxy.sh
export http_proxy=http://host.com:port/
export ftp_proxy=http://host.com:port/
export no_proxy=.domain.com
export HTTP_PROXY=http://host.com:port/
export FTP_PROXY=http://host.com:port/

#gedit proxy.csh
setenv http_proxy http://host.com:port/
setenv ftp_proxy http://host.com:port/
setenv no_proxy .domain.com
setenv HTTP_PROXY http://host.com:port/
setenv FTP_PROXY http://host.com:port/

I want to verify the following:

What will I put in the "export no_proxy=.domain.com" & "setenv no_proxy .domain.com". Is it the static IP Address "10.66.1.2" 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 04:58 AM.
 
Old 12-15-2004, 06:27 AM   #2
iluvatar
Member
 
Registered: Jul 2003
Location: netherlands
Distribution: debian
Posts: 403

Rep: Reputation: 30
Quote:
# gedit phpinfo.php

<?
phpinfo();
?>

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: "http://127.0.0.1/phpinfo.php" 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 ~=-.
 
  


Reply



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 07:37 AM
Please someone help a noob! I'm desperate nastynas Linux - Software 4 10-26-2004 10:47 PM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM
php-nuke with apache php mysql c0c0deuz Linux - Software 0 03-30-2003 06:23 AM
nooB ?, install: apache, PHP, postgreSQL and wine mrMahann Linux - Software 4 08-28-2002 12:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:19 AM.

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