473,756 Members | 3,211 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Installing PhP5 (Win). Browser shows code. Help?

I'm installing PhP5 on WinXP, with Apache2.
In my Apache's httpd.conf file I have added
LoadModule php5_module c:/php-5/php5apache2.dll
and moved the .ini file to C:/Windows/php.ini
Apache works with the php module loaded.
When I look at this code with my IE browser:

<? phpinfo(); ?>

or

<?php
phpinfo();
?>

....all I get in the browser is the code itself.
Q: why is it not working? How can I diagnose my problem?
I've spent hours with manuals, etc. Help greatly appreciated.
Jul 17 '05 #1
3 2112
Erick Howenstine wrote:
...all I get in the browser is the code itself.
Q: why is it not working? How can I diagnose my problem?
I've spent hours with manuals, etc. Help greatly appreciated.


You forgotten add the following line in your httpd.conf file:

AddType application/x-httpd-php .php
JW

Jul 17 '05 #2
> I'm installing PhP5 on WinXP, with Apache2.
In my Apache's httpd.conf file I have added
LoadModule php5_module c:/php-5/php5apache2.dll
and moved the .ini file to C:/Windows/php.ini
Apache works with the php module loaded.
When I look at this code with my IE browser:

<? phpinfo(); ?>

or

<?php
phpinfo();
?>

...all I get in the browser is the code itself.
Q: why is it not working? How can I diagnose my problem?
I've spent hours with manuals, etc. Help greatly appreciated.

in Apache httpd.conf file write something like this:
############### ############### ############### #######
AddType application/x-httpd-php .php4 .php .htm .php3 .inc .html
AddType application/x-httpd-php-source .phps
Scriptalias /php/ "c:/path_to_php/"
Action application/x-httpd-php "/php/php-cgi.exe"
############### ############### ############### #######
Jul 17 '05 #3
Varavva Yevgen aka xa4anypu wrote:
Scriptalias /php/ "c:/path_to_php/"
Action application/x-httpd-php "/php/php-cgi.exe"


The OP uses PHP as a module, so skip these lines.
JW

Jul 17 '05 #4

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

Similar topics

3
2643
by: Scott Matthews | last post by:
Hey all, I just tried installing PHP5 under IIS for the first time, but I can't seem to get the php.exe to work. I unzipped the package, and pointed the IIS .php 'executable' attribute over to php.exe in the PHP5 folder, but when I then call up a .php page, it just stalls. If I then point the IIS .php executable over to php.exe in the
4
3305
by: Philipp Lenssen | last post by:
OK, I can get PHP5 running on Apache 2 installed on Windows XP Home Edition. Now I want to add MySQL4 to the package. I installed it but I'm not sure what to do now. My PHP5 scripts are running fine. The MySQL server seems to be running though actually I'm not sure. When I write $link = mysql_connect("localhost", "mysql"); I get the PHP5 error message "Call to undefined function mysql_connect()" Can anyone help? (Or should I be using...
2
2583
by: y_oda2002 | last post by:
Hi everyone I was wondering if anyone could help me. I am trying to install ph so that i can learn the code. So far i havent had any problem installing apache. However when i try to get mysql to run wit apache and php the windows services gives an error upon startin apache. Something lik error module not found. php_mysql.dll does not exist
1
3716
by: Rami A. Kishek | last post by:
Please help! Very strange installation problem. First, let me say I successfully installed and use Python 2.2.3 and 2.3 from the EXE binaries on a win ME machine. That machine previously had 1.5.2, and now I have access to all 3 versions. When I tried to do the same on an older machine, however, running Win98 SE (and having had Python 1.5.2 previously installed there), the installation doesn't work: Obvious problems: * IDLE...
0
1128
by: Mike Oliver | last post by:
I'm having an issue installing a Windows Service on Win 2K3. After the installation, the service shows up in the Services list through Control Panel, but after the server reboots, it disappears from the list. Very bizarre. Why would the service disappear from the list after reboot? My installation works fine on any OS other than Win 2K3. Does it matter that this server is also the domain controller? Thanks in advance, Mike Oliver
9
4434
by: hari krishna | last post by:
hi, I want to send the data from dataset information to Excel through ASP.Net. there will be no XL installed on web server. web server is win 2000 server machine. I am using visual basic code in asp.net. The Xl sheet should not be opened in the browser. All the information from dataset(datatable,datarows) should be sent to XL and the file name should be given dynamically through program and the xl file should be saved dynamically through...
1
1883
by: Nospam | last post by:
I am trying to get mysql 4, php5, and apache to work on my winxp sp2 comp, unfortunately even though php5 and apache seems to work ok I am unable to utilise mysql with php and apache, I have yet to see a guide that has a problem free installation, if there is such a guide or a fix on how to get php5, apache and mysql all working on winxp sp2, after having moved libmysql.dll to the c:\php directory as well as the c:\windows\system...
5
1793
by: coaa | last post by:
It pains me to ask such a dumb question but... I already use PHP widely on a host server but I want to pre-test scripts on my (Windows) machine. I installed Apache(2_2) without problems but, having then installed PHP5 (Windows binary) carefully following instructions (default settings), it shows me the raw PHP code not the interpreted stuff. Even if I run PHP from a command line with a minimal script, it still shows me the raw code and not...
8
1601
by: Tony B | last post by:
Hi, I'm trying out my local copy of a site that uses php4, mysql,apache2. I've moved it from a php4 machine to a php5 machine, and it doesn't work at all now. A couple of other php4 sites I've moved, which are straight php and do not use mysql are working fine though. So it seems that the mysql php interface maybe the problem. Are there any site/docs which cover the differences between php4 and php5, and likely problems that may occur,...
0
9456
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
9275
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9872
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
9843
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,...
1
7248
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
5304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
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
3358
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
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.