473,246 Members | 3,285 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,246 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 2135


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: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.