473,662 Members | 2,454 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2483
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
1754
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 install I've written some python modules and scripts which I packaged as a source distribution with distutils and sent it to some of my colleagues
2
5789
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 I'm doing this all from Linux. I've been trying to get python cgi scripts to work, and I always end up with a "Premature end of script headers" in the error log. The scripts are executable by all and my httpd.conf seems fine. I also tested it...
0
2838
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; helles:/ # /usr/java/apache-ant-1.5.4/bin/ant -version Apache Ant version 1.5.4 compiled on August 12 2003 It complains about some unsupported class-version; does it require an
7
2380
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 does what I need. I've even tried writing a port forwarder in Java and found problems that nobody seems to have the answer to in forums. I need to make it work essentially the same on both Windows and Linux. There is one program, in C, that...
7
7832
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 details. You need to source your DB2 environment before running PHP configure: # . $IBM_DB2/db2profile
0
1292
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 --with-apxs2=/srv/apache-2058/apache/bin/apxs --with-ibm-db2=/opt/IBM/db2/V8.1 --with-pdo-odbc=ibm-db2,/home/db2inst1/sqllib
8
7087
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 php4-common 4.4.4-8+etch2 ii php5-common 5.2.0-8+etch4 ii php5-gd 5.2.0-8+etch4 ii php5-mcrypt 5.2.0-8+etch4
2
3105
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 from Firefox, I got a forbidden error "you do not have permission to access the file in the server" when I try to run the script form Firefox browser. Somebody please help me.
3
4101
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 to apply patch to configuration file and then apply a patch to sapi/servlet/servlet.java. But I am stuck at the first step it self. In the first step it says to apply a patch. But I could not get which file I've to modigy and where. I firmly...
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8856
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8762
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.