LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-19-2003, 12:51 PM   #1
viccavazos
LQ Newbie
 
Registered: Aug 2003
Location: Mexico, Allende, N.L.
Distribution: Red Hat Linux 9
Posts: 19

Rep: Reputation: 0
Unhappy PHP Problem in RHL9


Hello guys, can anybody help me please ?

One month ago I installed RHL 9 in two of my pcs and I'm reading every piece of information I can get.

The fact is: I recently bought a book titled "PHP and MySQL Web Development" to learn to program in PHP (ovbious). The problem is that when I follow the instructions on installation, I get everyting to work except PHP. When i create a test.php file with <?php phpinfo(); ?> function it doesn't give the page with info it should give.
The book guides to install explicit versions of the software, but this versions are not longer available so I replaced them with a sligtly newer ones.

I installed this:
MySQL-3.23.57-1.i386.rpm
MySQL-client-3.23.57-1.i386.rpm
MySQL-devel-3.23.57-1.i386.rpm
MySQL-Max-3.23.57-1.i386.rpm
MySQL-shared-3.23.57-1.i386.rpm

pdflib-4.0.3.tar.gz

curl-7.10.7.tar.gz

apache_1.3.28.tar.gz

php-4.3.2.tar.gz

openssl-0.9.6g

mod_ssl-2.8.15-1.3.28

and followed every instruction on installing, replacing the apropiated name when necessary. Everyting worked (and was tested) as said by the book, except PHP. Even tried the following code as recomended in the php official manual (in a file called test.php in the apropiated directory (htdocs)):

<html>
<head>
<title>Example</title>
</head>
<body>

<?php
echo "Hi, I'm a PHP script!";
?>

</body>
</html>

I can see the text on top of the browser, i mean, the html tags work, but not the php code. I have stoped the apache work and then restarted it; Have tried reinstalling php, and NO, it doesn't work.
I installed the software on another pc, and no, it doesn't work.

HELP PLEASE !!!
 
Old 08-19-2003, 12:53 PM   #2
martinman
Member
 
Registered: Apr 2003
Distribution: Gentoo 1.4
Posts: 290

Rep: Reputation: 30
make sure you built php IN to apache and that its enabled
 
Old 08-19-2003, 01:13 PM   #3
viccavazos
LQ Newbie
 
Registered: Aug 2003
Location: Mexico, Allende, N.L.
Distribution: Red Hat Linux 9
Posts: 19

Original Poster
Rep: Reputation: 0
This is what i did when installing...

gunzip -c apache_1.3.28.tar.gz | tar xvf -
cd apache_1.3.28
./configure --prefix=/usr/local/apache

then....

cd /usr/src
gunzip -c php-4.3.2.tar.gz | tar xvf -
cd php-4.3.2
./configure --with-mysql=/usr --with-xml --with-apache=../apache_1.3.28 --with-curl=../curl --enable-shared-pdflib
make
make install
cp php.ini-dist /usr/local/lib/php.ini

(Installed openssl-0.9.6g and mod_ssl-2.8.15-1.3.28)
Then

cd ../apache_1.3.28
SSL_BASE=../openssl-0.9.6g ./configure --enable-module=ssl --activate-module=src/modules/php4/libphp4.a --enable-module=php4 --prefix=/usr/local/apache --enable-shared-ssl
make
make certificate TYPE=custom
make install

and then modified httpd.conf adding:
# And for PHP 4.x, use:
#
AddType application/x-httpd-php .php
AddType application/x-httpd-hph-source .phps
 
Old 08-19-2003, 03:25 PM   #4
viccavazos
LQ Newbie
 
Registered: Aug 2003
Location: Mexico, Allende, N.L.
Distribution: Red Hat Linux 9
Posts: 19

Original Poster
Rep: Reputation: 0
I forgot to tell that both computers I have linux installed in, were installed as desktop, No Server or Workstation.... żis it important or not?

Last edited by viccavazos; 08-19-2003 at 03:31 PM.
 
Old 08-22-2003, 07:58 PM   #5
Saraev
Member
 
Registered: Apr 2002
Location: Los Gatos, CA
Distribution: boring redhat 9
Posts: 163

Rep: Reputation: 30
I can't seem to find any error with your installation, other than the insignificant (to this issue) typo of having "hph-source" in the conf file.

Normally I would say use source whenever possible, like you have. In this instance however, pop in your RH9 disc 1, open the package manager and install PHP+HTTPD in the "Web Server" section. For the purposes of learning php, it will get you going in the direction you desire.

Kudos on the choice of books. I learned a LOT of stuff from one of the older editions of that book.
 
Old 08-25-2003, 12:12 PM   #6
viccavazos
LQ Newbie
 
Registered: Aug 2003
Location: Mexico, Allende, N.L.
Distribution: Red Hat Linux 9
Posts: 19

Original Poster
Rep: Reputation: 0
Thank you very much for your time Saraev !!!

I actually could install and get to work all three MySQL, Apache and PHP following the instructions given in www.devside.net, it took me saturday from 8:30 am to 1:40 pm, but thanks to the guys from devside, now I have my linux box working with those packages and I'm willing to learn to program in PHP and develop something in the near future.

Now, if anybody have a question about the instructions given in devside (if you are going to install in RH9) maybe I can help with the experience I get following them, just post here.
 
  


Reply


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
uninstalling RHL9 jacobselvin Linux - Newbie 4 07-22-2005 10:51 AM
Problem mounting RHL9 ext3 drive in FC3 kassemi Linux - Hardware 6 03-23-2005 08:53 PM
New to PHP and Postgressql. Is this a PHP problem or a sql problem. Please help sendas4 Linux - General 2 11-05-2004 02:54 PM
Sound Card Detection Problem with RHL9 rupak Linux - Distributions 1 01-05-2004 12:40 AM
PDC problem in RHL9 kghoshal Linux - Networking 1 08-02-2003 01:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:38 PM.

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