473,396 Members | 2,087 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.

PHP Output... or lack thereof (on first time PHP Install)

'Tis my first time trying to install PHP on my Win XP machine...
Apache/2.2.3(Win32) PHP/5.2.0

Main problem is that with my lack of PHP experience,
I'm not sure if my syntax is incorrect, or if there was a problem with
my PHP/Apache Install

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I do get PHP output if I use a simple block of code like

<html>
<body></body>
<head>
<title>Test</title>
</head>
Today is <?php print strftime("%m/%d/%Y"); ?>
</a>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My output was: Today is 01/04/2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
I do not get PHP output if I use code that I copied and pasted from a
guide for PHP5

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<p>This is an HTML line
<?php
echo "<p>This is a PHP line</p>";
phpinfo();
?>
</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
the result from that file when loaded in a browser was absolutely
nothing!
Also, if I try to view the source code from this file after it's been
displayed in my browser
It is completely empty also!
~~~~~~~~~~~~~~~~~~~~~~~~~~~

If it helps you to know how I installed, continue reading!!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

My apache server has been running perfectly fine for a few months now,
just for serving basic HTML and the like.

When I installed PHP,
I chose the install option for an Apache 2.2x server,
told it where Apache was installed on my system, and where the /conf
directory was...
it seemed like it went smoothly by updating my httpd.conf file with the
following info

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "C:\PHP\"
LoadModule php5_module

"C:\PHP\php5apache2_2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

I've restarted my system since then, and the actual apache service

I've also tried following directions on how to configure Apache
manually for use of PHP, following directions from the following site
http://www.tanguay.info/wamp/installPhp5.php5?step=6
the only exceptions being, modified directory paths, and the lack of
the extensions folder... because I was under the impression that I'm
not using any extensions.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~

Thanks for making it all the way through this
I hope somebody can shed some light as to what I'm doing incorrectly!!!!

Jan 5 '07 #1
4 1804
Rik
Warren Peace wrote:
'Tis my first time trying to install PHP on my Win XP machine...
Apache/2.2.3(Win32) PHP/5.2.0

Main problem is that with my lack of PHP experience,
I'm not sure if my syntax is incorrect, or if there was a problem with
my PHP/Apache Install

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I do get PHP output if I use a simple block of code like

<html>
<body></body>
<head>
<title>Test</title>
</head>
Today is <?php print strftime("%m/%d/%Y"); ?>
</a>
</html>
Euhm, very interesting html...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
I do not get PHP output if I use code that I copied and pasted from a
guide for PHP5

<p>This is an HTML line
<?php
echo "<p>This is a PHP line</p>";
phpinfo();
?>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
the result from that file when loaded in a browser was absolutely
nothing!
Did you receive nothing, or maybe another header (401,404,500 spring to
mind)? Is this file in the same dir as the previous one? What happens if
you edit the file that works with the same php-code?
Also, if I try to view the source code from this file after it's been
displayed in my browser
It is completely empty also!
Hmmz, add this to the beginning of the file:
ini_set('display_error',1);
error_reporting(E_ALL);

Do you get an error message then?
--
Rik Wasmus
Jan 5 '07 #2
Thanks for such a rapid reply Rik

tried adding
ini_set('display_error',1);
error_reporting(E_ALL);

to the very beginning of the file that's not working (even before the
html)
same results ...
nothing was output
no error message (404 or otherwise)

and yes, it is in the same directory as the one that does spit out the
date

Thanks again

Rik wrote:
Warren Peace wrote:
'Tis my first time trying to install PHP on my Win XP machine...
Apache/2.2.3(Win32) PHP/5.2.0

Main problem is that with my lack of PHP experience,
I'm not sure if my syntax is incorrect, or if there was a problem with
my PHP/Apache Install

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I do get PHP output if I use a simple block of code like

<html>
<body></body>
<head>
<title>Test</title>
</head>
Today is <?php print strftime("%m/%d/%Y"); ?>
</a>
</html>

Euhm, very interesting html...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~
I do not get PHP output if I use code that I copied and pasted from a
guide for PHP5

<p>This is an HTML line
<?php
echo "<p>This is a PHP line</p>";
phpinfo();
?>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
the result from that file when loaded in a browser was absolutely
nothing!

Did you receive nothing, or maybe another header (401,404,500 spring to
mind)? Is this file in the same dir as the previous one? What happens if
you edit the file that works with the same php-code?
Also, if I try to view the source code from this file after it's been
displayed in my browser
It is completely empty also!

Hmmz, add this to the beginning of the file:
ini_set('display_error',1);
error_reporting(E_ALL);

Do you get an error message then?
--
Rik Wasmus
Jan 5 '07 #3
Rik
Warren Peace wrote:
Thanks for such a rapid reply Rik

tried adding
ini_set('display_error',1);
error_reporting(E_ALL);

to the very beginning of the file that's not working (even before the
html)
same results ...
nothing was output
no error message (404 or otherwise)
Not seeing a 404 message does not mean it's not in the headers. What
headers do you get? A 200 or otherwise?

And does the second file work if you leave out phpinfo();? If not, what are
the security permissions on the first file exactly the same as on the
second file?
--
Rik Wasmus
Jan 5 '07 #4
Hey Rik
thanks again for responding

It seems like things are working fine now.

I hope your linguistic skills continue to serve you well

Jan 5 '07 #5

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

Similar topics

2
by: Dennis | last post by:
The setup: Windows XP Pro Python 2.3 GTK+ 2.2.1.2 and pyGTK 1.99.17 for Python 2.3 from http://www.pcpm.ucl.ac.be/~gustin/win32_ports/ I've downloaded and installed per the instructions the...
1
by: mike | last post by:
regards: when nokia mobile browser at the first time access HTTP Server, What kind of "HTTP request" does the nokia mobile browser give to the HTTP Server? thank you May goodness be with you...
45
by: Ben Blank | last post by:
I'm writing a family of classes which all inherit most of their methods and code (including constructors) from a single base class. When attempting to instance one of the derived classes using...
1
by: sqlster | last post by:
When I get latest on asp.net project from VSS, I do the following: 1. Open up the project file in VS.net 2. Access bin folder via file explorer. 3. Select all the files and check off the read only...
1
by: peace2007 | last post by:
Hi, I'm developing a web application using C#.NET and AJAX. I need to install an activex the first time user opens my browser. But every time that the browser is opened the activeX is installed!!...
2
by: majestic12 | last post by:
This is the first time I've tried to use mysql/phpmyadmin and I'm having trouble. I'm using a geocites pro account and I got both installed and it set up a database call mysql and the user yroot. ...
16
by: phpmel | last post by:
Hi again, I tried this Ajax database thing for the first time and it is not working. Here is the code this is testAjax.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
4
by: tkpmep | last post by:
I have a simulation that runs many times with different parameters, and I want to aggregate the output into a single file with one rub: I want a header to be written only the first time. My...
1
by: fastestindian | last post by:
Hi, I am working on Winodws CE application. While degugging my application runs well. But when i create the build and install it and run it first time it gives me error as Error...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...
0
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...
0
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,...

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.