473,396 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to Configure Apache to run PHP Scripts on linux

Hi,

I am new to this PHP and linux OS as well. I am trying to install to
Apache 2.2.8 and PHP 5.2.5 and do some PHP coding. I've installed
Apache and tested it. Its working fine. Then, I installed PHP 5.2.5.
The command I used to configure is
../configure \
-with-apxs2=/usr/local/apache2/bin/apxs

After Installing PHP, I am not able to stop/start Apache. The error
is:
httpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/
local/apache2/modules/libphp5.so: undefined symbol:
php_ini_opened_path.

Then I surfed some groups in net and and tried the following changes
to 'httpd.conf' file:
[Deleted] LoadModule php5_module modules/libphp5.so
[ADDED]
<IfModule dir_module>
DirectoryIndex index.php default.php index.html index.htm
</IfModule>

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

AddType application/x-httpd-php .php .php3
[/ADDED]

Then I installed PHP again. As a result, "LoadModule php5_module
modules/libphp5.so" line got added in the httpd.conf file
automatically at line no 53. Still I face the same error which I
mentioned earlier.

Again I googled and did the following changes in addition to the
previous changes:
Copied the 'php.ini-dist' file to the location "/usr/local/lib/" and
renamed it to 'php.ini'
Still my Apache is not starting.

Then I removed the line "LoadModule php5_module modules/libphp5.so"
from 'httpd.conf' file and tried to start Apache. This time I am able
to start and stop apache. But I cannot run PHP scripts.

It seems like the problem is with the 'libphp5.so' file which
automatically gets created with PHP installation. Can anyone provide
me solution for this.

Thanks
Mohan
Feb 14 '08 #1
1 2473
ko*******@gmail.com wrote:
I am new to this PHP and linux OS as well.
OK, now tell us what distribution you're using here, please.

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

In a museum in Havana, there are two skulls of Christopher Columbus,
"one when he was a boy and one when he was a man."
-- Mark Twain

Feb 14 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Christopher De Vries | last post by:
The predominant operating system in my workplace is Solaris, with a bit of Linux and MacOS X thrown in. As such people expect to install new software with the sequence: ../configure make make...
2
by: David | last post by:
I've looked all over the place for an answer, and the only one I can find doesn't mean anything to me. The end of line issue with writting it in Windows and then uploading it doesn't help me since...
0
by: Markus Wollny | last post by:
Hello! When I try to run ./configure --with-java, it complains that ant doesn't work. However ant is installed, as is the latest Java SDK 1.4.2 from sun, PATH and JAVA_HOME are set correctly; ...
7
by: Hal Vaughan | last post by:
I have a problem with port forwarding and I have been working on it for over 2 weeks with no luck. I have found C programs that almost work and Java programs that almost work, but nothing that...
7
by: Brent Halsey | last post by:
Hi All, I am trying to configure php with IBM-DB2 and I get the following error: checking for IBM DB2 support... no configure: error: build test failed. Please check the config.log for...
0
by: Brent Halsey | last post by:
Hi All, I am having problems compiling php with the IBM-DB2 extension. The command I use to configure is # ./configure --with-mysql=/srv/mysql/mysql-standard-5.0.24a-linux-i686-glibc23...
8
by: deko | last post by:
I've just loaded phpMyAdmin on a Debian Linux server with Apache2, MySql5 and PHP5. myserver # dpkg -l | grep php ii libapache-mod-php5 5.2.0-8+etch4 ii libapache2-mod-php4 4.4.4-8+etch2 ii...
2
by: joe jacob | last post by:
I need to configure apache to run python scripts. I followed the steps mentioned in this site (http://www.thesitewizard.com/archive/ addcgitoapache.shtml). But I am not able to run python scripts...
3
by: kodaliece | last post by:
Hello Everyone, I am trying to configure Tomcat5.5 to run PHP5.2.5 scripts on linux machine. I got some information from http://wiki.apache.org/tomcat/UsingPhp as how to do this. First, It says...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.