LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 01-19-2006, 06:27 PM   #1
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Rep: Reputation: 0
Package Dependecnes, Apache, PHP


look at this.....

[root@host-xx-xx-xx-xx Desktop]# rpm -Uvh php-pear-5.0.4-10.5.i386.rpm
Preparing... ########################################### [100%]
package php-pear-5.0.4-10.5 is already installed
[root@host-xx-xx-xx-xx Desktop]# rpm -e php-pear-5.0.4-10.5.i386.rpm
error: package php-pear-5.0.4-10.5.i386.rpm is not installed

I've been trying to install PHP on this thing. The server’s been a mess all day. This little thing is preventing me from installing PHP through an RPM

I can't install PHP from a tarball cause it says it can't find APSX, perl is not installed, or apache wasn't configured with the enable-so option. (i compiled apache from a tarball earlier today using that parameter)

I'm also fairly sure perl was installed, I got into this whole messed when i finished compiling PHP, and did a make install for PHP and apache stopped responding. I have a working apache, nut now I have no PHP, and all of the sites are in PHP.


any help would be greatly appreciated..
 
Old 01-19-2006, 06:43 PM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
rpm -e php-pear-5.0.4-10.5.i386.rpm

that's wrong. You don't erase the rpm's filename, you use the package name.

rpm -e php-pear

anyway, php is installed. the problem could be that the php rpm you're installing was compiled against a different apache abi version than the one you have installed. Things go boom when this happens.

Unfortunately it's hard to say how to fix it since there could be a lot things you might not have installed, like perl.

Also when compiling apache, there's a few so options that don't get built even if you specify them to be built because you need to use the corresponding --with-<package> option.

Let's assume you have everything under the sun installed. For apache2.2.0, this is what I used to configure the apache build:

./configure --prefix=/usr/local/Apache2.2.X --enable-so --enable-mods-shared=all --enable-ssl --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-proxy-ajp --enable-proxy-balancer --enable-ldap --enable-authnz-ldap --with-ssl --with-ldap

that basically builds every module under the sun. Then for php5, this is what i used to configure the php build:

/configure --with-apxs2=/usr/local/Apache2.2.X/bin/apxs --with-mysql --prefix=/usr --with-config-file-path=/etc --enable-force-cgi-redirect --disable-cgi --with-zlib --with-gettext --with-gdbm --with-openssl --with-dom=/usr/include/libxml2 --with-unixODBC=/usr --with-imap=/usr --with-ldap --with-dom --with-dom-xslt --with-dom-exslt --with-kerberos --with-imap-ssl --enable-ucd-snmp-hack

when you do a make install, php will install the apache module and edit your httpd.conf file with the load module directive. You still need to edit your httpd.conf file (from the above example for me, it's in /usr/local/Apache2.2.X/conf) to add the appropriate handlers and type.

Code:
AddHandler php5-script .php
AddType text/html .php
you can optionally add this to the DirectoryIndex directive for index files. Mine:

Code:
DirectoryIndex index.html index.cgi index.pl index.py index.shtml index.php index.html.var
but it's going to be hard to diagnose your woes because I don't know what you have installed and don't have installed, whether you have all the devel packages installed that you need, etc...

Last edited by megaspaz; 01-19-2006 at 08:14 PM.
 
Old 01-20-2006, 01:59 AM   #3
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks for your help. I was able to get Apache to install again after discovering i had passed teh value for apsx improperly. After fixing that apache rolled. Still don't know what the deal is with the circular dependency, but the packages I needed to install are on there for now. I already have a replacement box I’m standing up to take this one down for maintenance. (not only was there this problem, but a lot of other things that didn't seem right (that are working fine on the new machine).

PHP is installed, and I made sure that the load module statement is in the httpd.conf file. made sure libphp.so is in the right spot, and made sure that httpd calls .php files. Right now something still isn't working right with PHP. I’ve restarted httpd, and restarted the server, but PHP still isn’t kicking in.. but it's been a long day for me (I was working on this since 8:00 am and it's now 3:00 AM the next morning.. I'll check in tomorrow, and thanks a lot for your help.
 
Old 01-20-2006, 12:01 PM   #4
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Okay, so far this morning, I have checked the httpd.conf file, and have tried to restart Apache. That's when Apache crashes. I thought maybe something is messed up with my PHP, so I did make clan, make distclean, and reconfigured it using simpler parameters, apache still won't start. When I replace httpd.conf with the backup copy, it starts, with no PHP.

I checekd the syntax of those lines again and again, and I also made sure i put tehm with other entries that were similar. are there special directions i need to use when I restart apache?
 
Old 01-20-2006, 01:26 PM   #5
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
what version of apache are you running? Also, what package did your apache come from? was it from apache.org or was it a package provided by your distro? the configure example I gave was for apache 2.2.0 which was from apache.org.

If you're still using the rpm of php, then again, it might not work since that rpm package might have compiled php with a different apache abi version.

I would say download php5 from php's website and compile your own php5 and then apache and php should work. Uninstall all of your rpm versions of php before doing this. if you need to see what packages you have installed with php in the package name:

rpm -qa | grep php

take note of the packages that are really php packages and uninstall those.

edit: I also forgot, check to see if perl is installed.
rpm -qa | grep perl

look that you see perl and perl-devel. it could be you don't have perl-devel installed.

Last edited by megaspaz; 01-20-2006 at 01:36 PM.
 
Old 01-21-2006, 06:51 PM   #6
dana340
LQ Newbie
 
Registered: Nov 2005
Posts: 18

Original Poster
Rep: Reputation: 0
Thanks so much for your suggestion. Yesterday evening, i was able ot get it running. I began looking for porblems in teh httpd.conf file, and it ended up when i removed the PHP module, Apache started. so i was able to rule out problems with Apache itself. Also, I learned how to use the RPM command properly. I was able to remove the packages that prevented from installing the PHP RPM file, and i was able to find a package for GD as well.

Okay, so now apache started, and PHP is working, Now teh name based hsoting is messed up. IN order to fix that i simply replaced my httpd.conf file with a backup i made before i started this whole thing, and it came back up. what a fun two days. Thanks so much for your suggestion. Yesterday evening, I was able to get it running. I began looking for problems in the httpd.conf file, and it ended up when I removed the PHP module, Apache started. So I was able to rule out problems with Apache itself. Also, I learned how to use the RPM command properly. After a little more digging I discovered that it was possible to work with multiple packages at the same time, by listing them nest to each other. Taking care of my circular dependency problem I was able to remove the packages that prevented from installing the PHP RPM file, and I was able to find a package for GD as well.

Okay, so now apache started, and PHP is working, Now the name based virtual servers are messed up. In order to fix that I simply replaced my httpd.conf file with a backup I made before I started this whole thing and it came back up. What a fun two days.
 
  


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
Best distro/package for Apache, PHP, MySQL combo radmax Linux - Networking 4 07-14-2005 07:54 PM
Apache,PHP and PostgreSQL in a package Boby Linux - Software 1 03-29-2005 06:21 PM
php apache or php cgi - php learner rblampain Linux - Security 3 12-17-2004 11:10 PM
slackware, apache and PHP from .tgz - problems with PHP szymon Slackware 2 09-06-2004 04:57 PM
reinstalled apache, php, still no php support SuSE 8.2 hindenbergbaby Linux - Software 1 10-14-2003 01:42 PM

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

All times are GMT -5. The time now is 08:39 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