Jump to content

Testing SHTML on localhost

Doesn't work for me as with PHP.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Testing SHTML on localhost Doesn't work for me as with PHP. Rate Topic: -----

#1 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 02 July 2008 - 02:54 AM

A while ago I set my Mac up so I could test PHP pages on it, and now I intended to use it for SHTML testing too, but it doesn't seem to be working.

Here's the simple code I used:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>SSI Test</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
</head>
<body>

<!--#echo var="DATE_LOCAL" -->

</body>
</html>


I thought that my Mac now acts just like an external host, but why isn't this file workin?
0

#2 User is offline   Karl Buckland 

  • A.K.A. Sirkent
  • Group: Administrators
  • Posts: 2,145
  • Joined: 04-April 06
  • Gender:Male
  • Location:Kent, UK

Posted 02 July 2008 - 08:22 AM

So you're running Apache and PHP? You also need to enable SSI more than likely. You may need to create a .htaccess file in the directory where you want SSI to happen with the following content:
AddHandler server-parsed .shtml
.
QUOTE(benbramz @ Aug 17 2007, 07:44 AM) Ive noticed that quite a few people are now adding quotes from the board into their signature. I think its started an new web-radiance craze.. :P
0

#3 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 02 July 2008 - 11:08 AM

Hi, I tried this: http://www.macdevcenter.com/pub/a/mac/2001...two.html?page=2

But I couldn't get it working. :(

Can you give me noobified instructions for turning on SSI and creating the .htaccess file? Puhlease :blushing:
0

#4 User is offline   Karl Buckland 

  • A.K.A. Sirkent
  • Group: Administrators
  • Posts: 2,145
  • Joined: 04-April 06
  • Gender:Male
  • Location:Kent, UK

Posted 03 July 2008 - 04:09 AM

Start on page 1 of that guide and let us know where you first start having trouble.

'I couldn't get it working' isn't particularly useful to me! Unfortunately I'm also not a Mac user so I'm not 100% sure how to advise you on anything Mac-specific.
QUOTE(benbramz @ Aug 17 2007, 07:44 AM) Ive noticed that quite a few people are now adding quotes from the board into their signature. I think its started an new web-radiance craze.. :P
0

#5 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 03 July 2008 - 06:23 AM

I had looked at the first page and thought that it was about something else (CGI) that wasn't necessarily important for using SSI. I actually even started on page 1 at first, entered "httpd -v" in Terminal but I didn't get the same result as on that site and the rest didn't work.

So I did everything that was instructed on page 2 and when I tested it in Safari w/ localhost, it said "Gleefully Served By Mac OS X" and the SSI line ( <!--#include virtual="/cgi-bin/test-cgi"-->
) was still in the source code.

This post has been edited by temhawk: 03 July 2008 - 06:24 AM

0

#6 User is offline   Karl Buckland 

  • A.K.A. Sirkent
  • Group: Administrators
  • Posts: 2,145
  • Joined: 04-April 06
  • Gender:Male
  • Location:Kent, UK

Posted 03 July 2008 - 10:18 AM

Apparently the normal Apache 1.3 documentation should work for you if you can find your httpd.conf:
http://httpd.apache..../howto/ssi.html
QUOTE(benbramz @ Aug 17 2007, 07:44 AM) Ive noticed that quite a few people are now adding quotes from the board into their signature. I think its started an new web-radiance craze.. :P
0

#7 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 03 July 2008 - 11:42 AM

Thanks... but I think I'll pass on that. I'm quite confused about a lot of these things, I was actually hoping more for a way to "turn on SSI" and "turn off SSI" without all kinds of modules, directives, security hazards and other things to take note of :sadgreen:
0

#8 User is offline   temhawk 

  • W.R. Private First-Class
  • Group: Members
  • Posts: 322
  • Joined: 30-August 07
  • Gender:Male
  • Interests:travel, cg art, macs, music, skateboarding, programming, discovery channel, TextMate 2

Posted 25 November 2008 - 11:44 AM

Well, I've got it figured out now :D

And I made a tutorial for all other temhawks on the interweb ^_^

This post has been edited by temhawk: 16 January 2011 - 02:20 AM

0

#9 User is offline   itecekigNes 

  • W.R. Private
  • Group: Members
  • Posts: 1
  • Joined: 03-July 11

Posted 13 July 2011 - 03:57 AM

I've learn a few just right stuff here. Definitely value bookmarking for revisiting. I wonder how a lot effort you place to create this kind of wonderful informative site.
viagra | viagra online | viagra 100mg | viagra without prescription | purchase viagra
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users