473,651 Members | 3,024 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\php5apa che2_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 1835
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('displa y_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('displa y_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('displa y_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('displa y_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
8654
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 pyGTK and GTK+ for win32 from the above locations. Folowing the instructions, I import pygtk first, run pygtk.require('2.0') second and then import
1
1956
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 all Thank you,Positive Feedback to mikeotp@gmail.com
45
6338
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 parameters, I get CS1501 (no method with X arguments). Here's a simplified example which mimics the circumstances: namespace InheritError { // Random base class. public class A { protected int i;
1
948
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 box. 4. Go back and build project. If I don't perform step 3, I would get whole bunch of errors but after step 3, I don't get any errors. Some how when I build the first time, the dll files get recreated and over written over the ones that...
1
1264
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!! The code I've used in my javascript is as follows: <html> <body> ... ... <object id="VaxBroadCastClientCAB" width="0" height="0" codebase="VaxStandardCab.cab" classid="clsid:9E7203CF-B852-4089-9F09-772FD6DBB849"> </body>
2
2282
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. It asked me to make my own user name, which I did, and had me create a password as well. When I went into phpMyadmin I was able to create a new database but I cant really do anything with it. When I go into privileges I get this warning: Warning:...
16
1816
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>
4
1281
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 program looks a bit like this: def main(): for param in range(10): simulate(param) def simulate(parameter):
1
1640
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 MyProject.exe TypeLoadException
0
8361
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
8278
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
8807
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
8584
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7299
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
6158
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
5615
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();...
0
4144
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2701
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

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.