Jump to content


Photo

PHP 5 install woes for LAMP (fedora core 5)


  • Please log in to reply
5 replies to this topic

#1 rashid

rashid
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 23 June 2006 - 05:16 PM

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


#2 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 24 June 2006 - 08:06 PM

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]

#3 rashid

rashid
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 26 June 2006 - 07:17 AM

[!--quoteo(post=387544:date=Jun 24 2006, 03:06 PM:name=Bane)--][div class=\'quotetop\']QUOTE(Bane @ Jun 24 2006, 03:06 PM) View Post[/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.

#4 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 26 June 2006 - 08:20 AM

[!--quoteo(post=387953:date=Jun 26 2006, 01:17 PM:name=rashid)--][div class=\'quotetop\']QUOTE(rashid @ Jun 26 2006, 01:17 PM) View Post[/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.

#5 rashid

rashid
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 26 June 2006 - 09:36 AM

[!--quoteo(post=387963:date=Jun 26 2006, 03:20 AM:name=Bane)--][div class=\'quotetop\']QUOTE(Bane @ Jun 26 2006, 03:20 AM) View Post[/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...

#6 Koobi

Koobi
  • Staff Alumni
  • Advanced Member
  • 419 posts
  • LocationColombo, Sri Lanka | South Asia

Posted 26 June 2006 - 09:58 AM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users