473,486 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

apache displays an empty page when running php

kaarthikeyapreyan
107 New Member
my apache 2 server displays a blank page when i run this code
[php]<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>[/php]

I have php5 and apache 2 in my machine
But my HTML pages are running properly in my server and they display their contents.
when i run my php code alone
for example[php]
<?php

// Show all information, defaults to INFO_ALL
phpinfo();

// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);

?>[/php]
This works great and all the information regarding php5 are displayed

Is the problem because am combining HTML and PHP in the wrong way or do i have to set anything before i could do that

Thanks
Mar 18 '08 #1
7 2392
TheServant
1,168 Recognized Expert Top Contributor
<html>
[PHP]<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>[/PHP]
That should work. Personally I like to put brackets around like:
[PHP]<?php echo( "<p>Hello World</p>" ); ?>[/PHP]
But that won't make any difference.

So there is no php response at all?
Mar 18 '08 #2
satas
82 New Member
See Apache's logs for any errors.
Mar 18 '08 #3
kaarthikeyapreyan
107 New Member
hey that a good catch :)
The file did not have its permission
But now I get the HelloWorld PHP's output but not the HTML stuff
My expectation is why nothing from the HTML liners came out
Mar 19 '08 #4
ronverdonk
4,258 Recognized Expert Specialist
Please enclose your posted code in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use [code] tags in future.

MODERATOR
Mar 19 '08 #5
ronverdonk
4,258 Recognized Expert Specialist
hey that a good catch :)
The file did not have its permission
But now I get the HelloWorld PHP's output but not the HTML stuff
My expectation is why nothing from the HTML liners came out
There is no HTML output, except for the title of your page, because you don't output anything else but the title and the Hello World message. What else would you expect to see on your screen?

Ronald
Mar 19 '08 #6
kaarthikeyapreyan
107 New Member
There is no HTML output, except for the title of your page, because you don't output anything else but the title and the Hello World message. What else would you expect to see on your screen?

Ronald
Sorry about the code part,and I actually missed a line of HTML code everything is fine now

Thanks
Mar 24 '08 #7
ronverdonk
4,258 Recognized Expert Specialist
Glad it works now. See you next time.

Ronald
Mar 24 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
14140
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
2
3574
by: gruddo | last post by:
Hi this is my first post. I have two webservers. I can run php code fine on one but not the other. Both webservers can read files only one can write. I have looked around at other posts and they...
5
8163
by: bissatch | last post by:
Hi, I am trying to install Apache and PHP. I have installed apache fine where I can type in http://localhost and it displays the default Apache page. When trying to install PHP I have run the...
1
2850
by: Rolfe | last post by:
Hi, I struggled, and got mod_python running on Apache/Win2k. Follow these instructions verbatim and you shouldn't have any trouble. These instructions are based on...
4
4357
by: Wilson | last post by:
I am currently running Oracle 8i with Apache setup in a 4-CPUs Windows 2000 Server. Users on their workstations connect to Oracle through Internet Explorer which accesses Apache's DAD object and...
3
3830
by: bizt | last post by:
Hi, I have been using a local installment of Apache web server and PHP on my computer. For some reason it has stopped loading my local web pages when I enter 'http://localhost' into the browser...
9
3732
by: Matt Helm | last post by:
I am starting the design phase of a large project (ERP) where the backend will mostly be Python (or Ruby) providing web services. In this type of usage, is there any benenfit to running under...
3
3738
by: rabbithutch | last post by:
This is a newbie, first-time post on this forum. I need help getting MySQL installed on my local server so that it will inter-operate with Apache 2.2. I am running WinXP Pro V2002 SP-2, Apache 2.2...
4
9056
by: jankristensson | last post by:
Hi I am an applications programmer with limited knowledge of system configuration. I have two development computers, XP Pro (IP 192.168.1.3 and 192.168.1.4) on a LAN behind a router (IP...
0
7105
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
7341
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4870
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...
0
4564
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...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
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 ...
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
266
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...

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.