Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The way RH 8.0 installs it is the httpd.conf file is in the /etc/httpd dir and then inside that is a conf and and conf.d directory that has the actual httpd.conf and the php.conf is in the conf.d directory.
The php.ini is in /etc.
Can anyone spot something assinine that I may be missing?
TIA!
PS: The server the files are on is NOT the same server that's having issues... LOL
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents. The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.html index.html.var
You could add the index.php just in case you make some php indexes and that way when specifying a page you don't have to type the full thing out if it has a index.php...
Distribution: ESXi CentOS Red-Hat Ubuntuu Solaris Debian
Posts: 85
Original Poster
Rep:
Thanks for the reply Tricky!
I tried what you suggested but still no joy. I made the changes to the config files and then stopped and restarted Apache but it still wouldn't render a php page. I am trying to test it by running the;
<? phpinfo() ?>
test page.
All I get is a blank page but if I view source, I can see the commands.
Distribution: ESXi CentOS Red-Hat Ubuntuu Solaris Debian
Posts: 85
Original Poster
Rep:
As an addition to this thread I'll add the following observations:
The httpd.conf file being loaded by this build is HEAVILY broken up in comparison with past versions I have worked with. Instead of all of the directives for the Daemon being placed IN the httpd.conf they put a bunch of them in the http.d directory and are all INCLUDED in the config read. (That why there was a separate php.conf file in the original message).
I have verified that all of the libs are there and that they actually match what should be there for the version being run. The only thing I haven't done is to check how the RedHat installer compiled the Apache Server and what modules it included. I ASSUME that since php was AUTOMATICALLY included in the install that it also COMPILED it as part of the server... Heck the conf files reference it so it would make sense that it should have right?
So it still remains as to why the Apache process is not handling the interpreting of the .php pages or internal directives correctly...
first u should take a look at the php-error log file and apache log and error-log as well. i don't know where they are located but u'll find the address in php.ini and httpd.conf.
did u set the DocumentRoot in httpd.conf? if not u should do that.
post contents of php error-log if u don't find out yourself
cheers, jens
maybe the phpinfo() function is disabled in php.ini. u might try another piece of code
i had this same problem when installing RH8
my problem was that Apache was already installed, so i needed to remove it first
do this...
rpm -qa | grep http
it should find 2 packages
remove them both
remove the one with the word "redhat" in it first (it'll be like redhat-1.0.13-http or something like that
then remove the other one (it'll be like httpd-2.0.48 or something)
the default apache install puts the files in /var/www
doing the above will remove all that crap
then download apache and install it (which puts it in /usr/locall/apache)
then download php and install it
you should be golden
RH installed Apache by default because you selected a certain option on the install
doing a complete bare install does not install apache
One of the things I've had problems with is passing data from a form with a put or a get method...
The simple <?php Print "Hello" ?> stuff works as there is no data from another page, but it doesn't seem to recognise any variable names, or PHP system variables. Have you the same problem?
Distribution: ESXi CentOS Red-Hat Ubuntuu Solaris Debian
Posts: 85
Original Poster
Rep:
By way of update...
I ripped out the Default RPM for PHP and APACHE that came with the redhat install and I now have it 'functional'.
The main issues are the same ones that I am running into with the other server... (Namely the installation of stuff like GD libs, lib-JPEG, libPNG, and the like).
I am a bit disappointed in the RH install that they did not get the config scripts right to get this to run. Then again I am still NOT sure which order to install the stuff in... Seems kinda kludgy.... In this instance I installed Apache first and then PHP.
I had the same problem when installing redhat8. Spend some time doing configuration changes and php would still not work. The problem was in the /etc/php.ini file. Just copied my old one over it, restarted apache and everything worked like a charm.
what exactly did you change in the php.ini file to get it working as I am having the same problem. I changed it to use short tags but still scripting is not working, I can't even echo.
Distribution: ESXi CentOS Red-Hat Ubuntuu Solaris Debian
Posts: 85
Original Poster
Rep:
Hi Teded...
You'll have to do a bit of describing of where you're at and how you got there so maybe I can chime in a more direct answer... There's lots of ways to get to an Installed state. It's all in how you do it that counts...
I basically installed the cd's for redhat 8.0 (php,mysql,apache). When I run a PHP script I just get the code showing up on my web browser window, at first I couldn't even test if PHP was working because the short open tags was off, changed it to on and I verified PHP is working. But I cannot even get a echo command to work.
I can post my php.ini file if it will help
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.