Jump to content

PHP 5 install woes for LAMP (fedora core 5)


Recommended Posts

Can someone please tell me what this means

[root@magic ~]# apachectl -t
httpd: Syntax error on line 54 of /www/conf/httpd.conf: Cannot load /www/modules/libphp5.so into server: /www/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied

I have installed everything perfectly. I have apache 2 working + made databases and table data in mysql.
As soon as I try to complete the P of the LAM it keeps acting the fool. Here is my install process, please please
advise me where Im going wrong...

gunzip php
tar -xvf php
yum -y install libxml2-devel (./configure will not work without this and neither will make)

vi php_install

cd /usr/local/src/php-5.1.4
./configure \
--prefix=/usr/local/php
--with-apxs2=/www/bin/apxs \
--with-mysql=/usr/local/mysql \
--enable-ftp \
--enable-trans-sid

chmod 755 php_install
./php_install (this goes alll ok with no errors)

make
(watch verbose output)
Build complete.
(It is safe to ignore warnings about tempnam and tmpnam).

make install.
cp php.ini-dist /usr/local/lib/php.ini

and then when I make my test php page called index.php as I have added the following in httpd.conf
<IfModule dir_module>
DirectoryIndex index.php default.php index.html index.htm
</IfModule>
AddType application/x-httpd-php .php .phtml



this is when I get the above error when running apachectl -t /graceful/start/restart/stop

any of these switches returns the error. Im so hacked off! This is all I need to get working so
I can work on data etc. Im trying to build this quicktime so I can get some HTML/CSS files on
to my server and start testing.

Im grateful for all your time in reading this... hope to hear from anyone soon.

Box is Fedora Core 5 on
Compaq Deskpro
256Mb+
9.5Gb HDD

Thx+Peace
Link to comment
Share on other sites

sounds like an SELinux issue.

i can't confidently tell you the solution because i've never tried this but you would probably have to manipulate the .so file using chcon so that you can manipulate the security settings of that particular .so file. It seems as though SELinux is not allowing apache to access it because the system sees it as an unauthorized file.

[a href=\"http://en.wikipedia.org/wiki/Security_Enhanced_Linux\" target=\"_blank\"]Security-Enhanced Linux (SELinux)[/a]
[a href=\"http://www.nsa.gov/selinux/info/faq.cfm\" target=\"_blank\"]SELinux Frequently Asked Questions (FAQ)[/a]
Link to comment
Share on other sites

[!--quoteo(post=387544:date=Jun 24 2006, 03:06 PM:name=Bane)--][div class=\'quotetop\']QUOTE(Bane @ Jun 24 2006, 03:06 PM) [snapback]387544[/snapback][/div][div class=\'quotemain\'][!--quotec--]
sounds like an SELinux issue.

i can't confidently tell you the solution because i've never tried this but you would probably have to manipulate the .so file using chcon so that you can manipulate the security settings of that particular .so file. It seems as though SELinux is not allowing apache to access it because the system sees it as an unauthorized file.

[a href=\"http://en.wikipedia.org/wiki/Security_Enhanced_Linux\" target=\"_blank\"]Security-Enhanced Linux (SELinux)[/a]
[a href=\"http://www.nsa.gov/selinux/info/faq.cfm\" target=\"_blank\"]SELinux Frequently Asked Questions (FAQ)[/a]
[/quote]

Bane

thx for being the only one bothered to reply, appreciate that. i will look into this though Im sure I disabled SELinux at the install stage. I'll check the links you posted, thanks very much dude.
Link to comment
Share on other sites

[!--quoteo(post=387953:date=Jun 26 2006, 01:17 PM:name=rashid)--][div class=\'quotetop\']QUOTE(rashid @ Jun 26 2006, 01:17 PM) [snapback]387953[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Bane

thx for being the only one bothered to reply, appreciate that. i will look into this though Im sure I disabled SELinux at the install stage. I'll check the links you posted, thanks very much dude.
[/quote]

Not a problem. The only reason I have time to reply here is because the other guys are doing such a great job of replying in other parts of the forum that need attention too :)

Hope you sort it out and let me know if need further assitance with this.
Link to comment
Share on other sites

[!--quoteo(post=387963:date=Jun 26 2006, 03:20 AM:name=Bane)--][div class=\'quotetop\']QUOTE(Bane @ Jun 26 2006, 03:20 AM) [snapback]387963[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Not a problem. The only reason I have time to reply here is because the other guys are doing such a great job of replying in other parts of the forum that need attention too :)

Hope you sort it out and let me know if need further assitance with this.
[/quote]

Bane

You are the man! I now have a fully functional LAMP server. I checked your links then found out how to
disable SELinux by going to /etc/sysconfig/Selinux and changing =enforcing to disabled. Rebooted

I then ran
./configure again make & make install
started MySQl - restarted apache but ran a systax check first. Looked all ok, then tested my php page from the
DIR where all my html docos are stored. piece a cake.

I'll be looking to run this on Gentoo very soon.

Thanks again for your time. Peace...
Link to comment
Share on other sites

sweet :)
and thanks for posting the solution here for the others to see.


yeah i'm planning to move to another distro soon, either Debian or Gentoo...or both on different PC's


glad you sorted it out.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.