473,385 Members | 1,357 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,385 software developers and data experts.

Need help getting hello-world working

System login message says PHP is available, so I tried this:
http://www.rawbw.com/~rem/HelloPlus/h.php
It doesn't work at all. Browser just shows the source.
What am I doing wrong?
Jul 17 '05 #1
6 2145


Robert Maas, see http://tinyurl.com/uh3t wrote:
System login message says PHP is available, so I tried this:
http://www.rawbw.com/~rem/HelloPlus/h.php
It doesn't work at all. Browser just shows the source.
What am I doing wrong?


Nothing.

Talk to you system admins or help desk. There's a problem with the
setup on your system.

Ken

Jul 17 '05 #2
> Robert Maas, see http://tinyurl.com/uh3t wrote:
System login message says PHP is available, so I tried this:
http://www.rawbw.com/~rem/HelloPlus/h.php
It doesn't work at all. Browser just shows the source.
What am I doing wrong?

From: "Ken Robinson" <ke******@rbnsn.com>
Nothing.
Talk to you system admins or help desk. There's a problem with the
setup on your system.


The full text of the login message regarding PHP is:
2001/06/11: PHP is available. To setup for an extension in your
site, use an .htaccess and do for example: AddHandler php4-script .php
If there are features or modules you need not in our copy let me know
and I'll consider adding it; do not compile your own.

When I originally read that in 2001, I had no idea what PHP was,
thought it was something used only on PPP dialup accounts, which I
didn't have, I have only VT100-shell dialup access, so I ignored it.

Then last year, when I first found out elsewhere what PHP meant, I took
the system message to mean that PHP is generally available, but if I
need to do something beyond the basic stuff I need to set up an
extension, sort of like installing an add-on to a Web browser to handle
macromedia or realsound or powerpoint or MS-Word etc., so I assumed
that for a simple hello-world example I wouldn't need to do anything
special, so I tried, but it didn't work.

Then somewhere in some thread on another topic, somehow my problem
seemed worth mentionning, so I did, and somebody responded to say that
PHP is disabled by default and I need to set up .htaccess to use it at
all. But I was busy with other tasks so I couldn't try it immediately.
Now months later I can't find that old thread and can't remember
exactly what the other person said. So last night after searching for
that old thread without success, believing I need to make such a file
but having no idea what is supposed to be in such a file, I blindly
went ahead and copied the example text from the system message to make
such a file on my home directory, but that didn't make PHP start
working for me. So then I spent another hour or two looking for that
old article, couldn't ever find it, so finally I posted here and you
responsed. Then this morning after seeing your reply I spent another
hour looking for that old thread, but still couldn't find it, so now
I'm back here telling you how desperate I am for your help.

So does that system message give you, a PHP expert, any clue that
there's some simple thing I need to do to activate PHP on my Web site,
or do I really need to bother the sysadmin about this?

By the way, if you're wondering why I'm wishing to use PHP here:
I would like to include PHP in my beyond-hello-world examples:
http://www.rawbw.com/~rem/HelloPlus/hellos.html#phpx
Jul 17 '05 #3


Robert Maas, see http://tinyurl.com/uh3t wrote:
The full text of the login message regarding PHP is:
2001/06/11: PHP is available. To setup for an extension in your
site, use an .htaccess and do for example: AddHandler php4-script .php
If there are features or modules you need not in our copy let me know
and I'll consider adding it; do not compile your own.


Well, did you put the line

AddHandler php4-script .php

in the file named .htaccess which should reside at the top most
directory of your web area (where your home page index.html resides)?

If you didn't, then do that and let us know what happens. If you did,
then talk to the support people.

Ken

Jul 17 '05 #4
> From: "Ken Robinson" <kenrb...@rbnsn.com>
(Google Beta is trashing your e-mail address, even in mode where it
claims it's showing me ORIGINAL format of your message.)
Well, did you put the line
AddHandler php4-script .php
in the file named .htaccess which should reside at the top most
directory of your web area (where your home page index.html resides)?


No, I hadn't done that. I had it in my login home directory. In
response to seeing your message here, I moved it from my home directory
to my public_html directory, and then tried to get into my Web site,
only to find that access is denied, can't view any files whatsoever
from my Web directory via HTTP. So I moved it back to my home directory
until you can tell me what to put in the file so I have any access at
all while still enabling php. Here's the current situation:

% ls -lt .ht*
2 -rw------- 1 rem user 28 Jun 25 02:08 .htaccess
% cat .ht*
AddHandler php4-script .php

As soon as you tell me what else goes in there, I'll put it there and
move the file to public_html to see what happens.
Jul 17 '05 #5


Robert Maas, see http://tinyurl.com/uh3t wrote:
From: "Ken Robinson" <kenrb...@rbnsn.com>

(Google Beta is trashing your e-mail address, even in mode where it
claims it's showing me ORIGINAL format of your message.)


It's called "munging", so spamers can't get it from google groups.
Well, did you put the line
AddHandler php4-script .php
in the file named .htaccess which should reside at the top most
directory of your web area (where your home page index.html resides)?


No, I hadn't done that. I had it in my login home directory. In
response to seeing your message here, I moved it from my home directory
to my public_html directory, and then tried to get into my Web site,
only to find that access is denied, can't view any files whatsoever
from my Web directory via HTTP. So I moved it back to my home directory
until you can tell me what to put in the file so I have any access at
all while still enabling php. Here's the current situation:

% ls -lt .ht*
2 -rw------- 1 rem user 28 Jun 25 02:08 .htaccess


On my machines the protection mask is "-rw-r--r--". Remember the
process that needs to read this file is not running under your name,
but usually runs under the name "nobody".

Ken

Jul 17 '05 #6
> From: "Ken Robinson" <ke******@rbnsn.com>
% ls -lt .ht*
2 -rw------- 1 rem user 28 Jun 25 02:08 .htaccess

On my machines the protection mask is "-rw-r--r--".


Aha, that was the final piece of the puzzle, thanks very much. I just
assumed it'd be Apache that was reading that file to check permissions,
so it didn't have to be group/other readable, since Apache is a system
daemon. Oh well. Anyway, I changed the protections, and moved the file
back to public_html,
2 -rw-r--r-- 1 rem user 28 Jun 25 02:08 public_html/.htaccess
and now not only were my regular Web pages still working but my php
test was working for the first time ever. So then I decided to run the
HTML validation service on not just that file but the master file that
shows all the hello and hello-plus examples, spent the whole day fixing
most of my stuff to be valid HTML transitional, and now with everything
looking good I finally have time to thank you and post the URL:
http://www.rawbw.com/~rem/HelloPlus/hellos.html#php0
Please take a look at it now, and if you're curious pop up to the top
of the main file and browse the contents.

Someday I should go on to the next step whereby the script produces
content that varies with time of day or user's IP number, with PHP as
I already did with: sh* perl lisp java
http://www.rawbw.com/~rem/HelloPlus/hellos.html#step1
Jul 17 '05 #7

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

Similar topics

8
by: Bshealey786 | last post by:
Okay im doing my final project for my first computer science class(its my major, so it will be my first of many), but anyway im a beginner so im not to great with C++ yet. Anyway this is the error...
4
by: suzy | last post by:
it seems like a simple enough problem, but i need some help...... i have a table of messages (like newsgroup messages) in sql server. my application will allow people to read threads/messages...
5
by: Siva | last post by:
Hello I have a dropdownlist inside the gridview as a template column defined as follows: <asp:TemplateField HeaderText="Choose Location"> <ItemTemplate> <asp:DropDownList ID="ddlChooseLoc"...
18
by: teddybear | last post by:
Hi, I begin to write PHP but run into problem already. First, I do not know where to put my PHP code? Where is the IIS Root Directory? (I'm using Windows XP). I have run Installer... but when I...
10
by: Learner | last post by:
Hello, I am trying to create few dynamic controls and once they are rendered I need to save the information that was entered into these dynamic fileds. For instance when I create 3 radio button...
9
by: Tony Girgenti | last post by:
Hello I developed and tested a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1. It uses a web form. I tried doing this without any help, but i'm...
9
by: MrHelpMe | last post by:
Hello again experts, I have successfully pulled data from an LDAP server and now what I want to do is drop the data into a database table. The following is my code that will insert the data but...
5
by: Chuck Anderson | last post by:
I run Apache 2.0.55, and Php (both 4.4.1 and 5.2.5) on my home PC (Windows XP). One of the scripts that I run daily needs to access a secure URL (https://..............). When I am running Php4,...
6
by: mohaaron | last post by:
Hello all, I'm not very good with writing regular expressions and need some help with this one. I need to validate an email address which has the full name of the person appended to the...
3
by: Alexnb | last post by:
Alexandr N Zamaraev wrote: Excellent! it works. But I have one more question. How can I test to see if the first character of a string is what I want, for example, how can I test to see if the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.