LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   copy library file (https://www.linuxquestions.org/questions/linux-newbie-8/copy-library-file-4175643184/)

catiewong 11-27-2018 08:17 AM

copy library file
 
I just try to install apache to centos server , when start apache , it pops the below error .

I just would like to ask if the file "libphp5.so" is missing , could I copy it from another machine which have the samiliar version of php ?


Code:

httpd: Syntax error on line 185 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: undefined symbol: XpmLibraryVersion

pan64 11-27-2018 08:21 AM

libphp5 is available, but that version is not compatible with the apache.

jsbjsb001 11-27-2018 08:21 AM

If you want to risk borking your system, yeah sure, why not?

Why not just post what's on line 185 so we can see what it's on about?

scasey 11-27-2018 08:22 AM

Is php installed?

dc.901 11-27-2018 10:42 AM

Quote:

Originally Posted by catiewong (Post 5930610)
I just try to install apache to centos server , when start apache , it pops the below error .

I just would like to ask if the file "libphp5.so" is missing , could I copy it from another machine which have the samiliar version of php ?


Code:

httpd: Syntax error on line 185 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: undefined symbol: XpmLibraryVersion

So, after installing apache, did you edit the httpd.conf file and added "libphp5.so" in it? What if you remove it, does apache start?

Does the application you have need php?
If php is needed, you need to install with yum command.

Otp 11-27-2018 12:02 PM

Nicee..

catiewong 11-27-2018 07:09 PM

Quote:

Originally Posted by jsbjsb001 (Post 5930615)
If you want to risk borking your system, yeah sure, why not?

Why not just post what's on line 185 so we can see what it's on about?

line 185

Code:

LoadModule php5_module        modules/libphp5.so

catiewong 11-27-2018 07:10 PM

Quote:

Originally Posted by dc.901 (Post 5930685)
So, after installing apache, did you edit the httpd.conf file and added "libphp5.so" in it? What if you remove it, does apache start?

Does the application you have need php?
If php is needed, you need to install with yum command.

if remove this line , the apache still can be started , but when run php program , it pops error , therefore , this line must be inlcuded in httpd.conf to start

dc.901 11-27-2018 07:25 PM

Quote:

Originally Posted by catiewong (Post 5930869)
if remove this line , the apache still can be started , but when run php program , it pops error , therefore , this line must be inlcuded in httpd.conf to start

You cannot just insert this line in httpd.conf, you have to install php module for apache (using yum).
So, first, remove that line from httpd.conf, then install php module for apache; I think it is called mod_php (search with yum)
Code:

yum search mod_php
Then install it.
After install with yum, it will insert the line in httpd.conf; so after yum command, restart httpd service and test your application.


All times are GMT -5. The time now is 08:28 PM.