Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error in starting apache 1

Status
Not open for further replies.

gglgokop1704

Programmer
Aug 9, 2007
54
GB
Dear All,

I have installed php, apache2 (httpd-2.2.6) and postgreSQL5 in Linux. I could not run my php scripts on the webserver/web browser. I tried to restart the apache server but got this error:

[root@isxp1313c ~]# /etc/rc.d/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: Syntax error on line 190 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory
[FAILED]

When I removed LoadModule php5_module modules/libphp5.so from /etc/httpd/conf/httpd.conf file, it restarted ok, but still I cannot run my php scripts. I have never worked on php before, please how do I run php scripts on mozilla firefox web browser in linux?

Any help is appreciated
Gokop
 
Sounds like you have the wrong path to libphp5.so.

Find the file and either change the line in httpd.conf or copy the .so file to the suggested directory.

On Ubuntu/Kubuntu the file is in /usr/lib/apache2/modules/. With a pointer in /etc/apache2/mods-enabled/. Each distro may be different.

Mark
 
Dear All,

When I removed the LoadModule php5_module modules/libphp5.so and restart apache this way, it works fine:

[root@isxp1313c ~]# /etc/rc.d/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]

but gave this error when restarted another way:
[root@isxp1313c ~]# /usr/local/apache2/bin/apachectl restart
httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
[root@isxp1313c ~]#


When php is integrated to mozilla, when one wants to open a .php file, I did not see an option for *.php but only *.xml, *.html, etc. Why? Does that mean that php is not integrated with the web browser?

Please must one use apache as a web server with PostgrSQL? I am using PostgreSQL in linux so that I will use javascript for the client side and php for the server side.

Kind regards
Gokop
Please any help is appreciated.

 
I'm not sure what you mean by not integrated to Mozilla.

PHP or any server side language for that matter aren't integrated into browsers. They are parsed on the server, and the only thing the browser receives is the resulting html.

When you develop in PHP or any server side language, you must request the file to the server, and have it parse it, and then return its results to the browser.

so if you are opening the file form the Open File option in the browser that is wrong.

you need to call it via a valid URL such as
Going by the error you posted, it means apache can't find the library where it is located, so follow Kosusnik's advice and make sure the file is where it is supposed to be.




----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Hi All,

Seems I got the apache2 working but I have this error:

404 Not Found Mozilla Firefox

Not Found

The requested URL /usr/local/postgresconnect.php was not found on this server.
Apache/2.0.52 (CentOS) Server at isxp1313c.sims.cranfield.ac.uk Port 80


Please what is the cause of this?

Kind regards
Gokop
 
the php script is not located within or below the document root. check httpd.conf. if you still have problems, ask in the apache forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top