LinuxQuestions.org
Help answer threads with 0 replies.
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 09-02-2010, 12:05 PM   #1
nonshatter
Member
 
Registered: Aug 2010
Location: Hants
Distribution: SLES, Ubuntu, Centos
Posts: 41

Rep: Reputation: 0
php installation problems with SUSE


Hi all,

I've installed php onto apache numerous times but I am really having difficulties using Suse.

We already have apache2 installed on our development server and we want php installed on top - no problem... or so I thought.

I think the problem is that there is no apxs2 in the file system. And also the libphp5.so module isn't being created by the php installation.

Can anyone shed some light on this or does anyone know what packages could be missing? Where could I get apxs2 or the php module from?

Many Thanks, Nonshatter
 
Old 09-02-2010, 12:46 PM   #2
nonshatter
Member
 
Registered: Aug 2010
Location: Hants
Distribution: SLES, Ubuntu, Centos
Posts: 41

Original Poster
Rep: Reputation: 0
Sorry again, I'm making a habit of starting a new thread then solving the problem moments later! I do apologise.

The apxs2 binary wasn't being found with locate, but I randomly stumbled across it in another directory, then all that was required was to restart the php configuration process with the apxs2 path. I did run into another problem at the end of the make install [apxs:Error: Config file /etc/apache2/httpd2-prefork.conf not found.] which was solved by the following instructions:
Quote:
SuSE uses a rather fragmented set of Apache configuration files stored in /etc/apache2/. When you configure PHP 5.x with:

$ ./configure --with-apxs2=/usr/sbin/apxs2
$ make

everything builds just fine; but when you issue:
$ su -c "make install"

the unconventional Apache conf file layout confuses the install-sapi section of the Makefile and the process halts with the following error:

apxs:Error: Config file /etc/apache2/httpd2-prefork.conf not found.
make: *** [install-sapi] Error 1

At this point only the PHP SAPI library has been copied into place; the rest of the files (like PEAR scripts, PHP-CLI, etc) have not been installed. But never fear! You can overcome this problem with the following steps:

1. Edit Makefile and change the following line to remove "install-sapi":
install_targets = install-sapi install-cli install-pear install-build install-headers install-programs

2. Issue the make install command again:
$ su -c "make install"

3. Add the PHP module & type instructions to the Apache configuration. As root, create a new file, /etc/apache2/conf.d/php5.conf that contains the following lines:

LoadModule php5_module /usr/lib/apache2/libphp5.so
AddType application/x-httpd-php php

--- And that's it. Everything else is just as the documentation suggests it should be.
 
Old 09-02-2010, 12:57 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,591

Rep: Reputation: 4588Reputation: 4588Reputation: 4588Reputation: 4588Reputation: 4588Reputation: 4588Reputation: 4588Reputation: 4588Reputation: 4588Reputation: 4588Reputation: 4588
Quote:
Originally Posted by nonshatter View Post
Hi all,
I've installed php onto apache numerous times but I am really having difficulties using Suse.

We already have apache2 installed on our development server and we want php installed on top - no problem... or so I thought.

I think the problem is that there is no apxs2 in the file system. And also the libphp5.so module isn't being created by the php installation.

Can anyone shed some light on this or does anyone know what packages could be missing? Where could I get apxs2 or the php module from?
Many Thanks, Nonshatter
Don't know what you've installed or how, or on what version of SuSE. But on my openSUSE11.3 box now (and 11.xx before that), PHP installation was a breeze.

Go into YAST->Software Management->Search and look for PHP. I believe the relevant modules are PHP5, apache2-mod_perl, apache2-mod_php5, and PHP5. There are other PHP related modules that you can grab too, but I think those are the basic ones. Should have to install them, and restart Apache.
 
  


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
Cacti Installation Problems with include/config.php tovythomas Linux - Software 2 03-13-2007 07:49 PM
PHP Installation Problems thammerlund Linux - Newbie 4 07-12-2006 09:14 PM
Php Installation problems Dillius Mandriva 1 05-25-2006 04:39 AM
Problems with Apache and PHP on SUSE jacobt Linux - Software 9 12-20-2005 05:56 AM
Solution to ALL MySQL, PHP, Apache2 problems in SuSE SuSE_fan Linux - Software 5 06-03-2004 09:07 AM

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

All times are GMT -5. The time now is 07:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration