Getting started

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
beach_defender
Forum Newbie
Posts: 2
Joined: Mon Dec 23, 2002 6:51 pm
Location: Nothern Beaches, Sydney Oz

Getting started

Post by beach_defender »

Hi,
I'm not sure this is the right forum, so I'm more than happy to get instruction on same. I've very recently moved back to a more hands on involvement in web design from a Dilbert stylr management career of over ten years. I was once a fairly OK C programmer (medals and stuff like that).

I think my brain has died though.

I've just started to help on a web site (http://www.realsurf.com ) and we are setting up a devleopment environment based on the existing site to move it to more component based framework. The issue is this, we've copied all of the important content etc into a new environemt (Redhat 7.3 ) but I cant get the index.php3 file to display proerly.

Some background, I installed 7.3 from the distro CD with pretty much default paramters. I understood that the Apache install component of this would install the PHP modules as part of the install ("they" told me so). I've done this on my RH7.3 box at home and get the following message -
Parse error: parse error in /www/sites/index.php3 on line 18

Or, on the other box it simply displays the entire text of the file.

Where do I start to figure out what's giong on?

THanks
Barry
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

this best fits under the PHP forum.

to start could you show us the code for index.php3 ? saying there is a parse error without showing us the code is of very little use.
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

A: dont use .php3 extension, stick with .php may help later with compatibility issues. Also always report parse errors with code as we can't answer otherwise.
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

I just read that on the other box it displays the text of the file. That means PHP isn't interpreting the File extension as PHP file, and so is displaying it like a txt file.

A: Check to see if PHP is installed
B: Dont use php<numeric> extensions as stated above: eg: .php3
beach_defender
Forum Newbie
Posts: 2
Joined: Mon Dec 23, 2002 6:51 pm
Location: Nothern Beaches, Sydney Oz

Post by beach_defender »

Hi and thanks to the folks that replied.

I've got it working.

I do understand that in order to solve a 'real' parsing problem, the code is instructive. I guess my purpose was more to get some feleling in terms of the architectural issues.

It turns out that the 'parse' error was related to having ASP_TAGS turned off rather than the code itself (tricky little '<%' )

Again, thank you very much for your responses. Hopefully I'll have more challenging issue to deal with in the future.

Cheers,
Barry
Post Reply