Does ASP work on mac osx?

Soldato
Joined
13 Feb 2004
Posts
2,656
Location
South Shields
I'm having a few issues coding a cms using asp..

I've built a simple login procedure, tested it on both a windows based machine and a mac osx based machine..

It works on the windows machine but not on the mac..
It brings up an error refrencing IIS.. but I've coded anything to do with IIS..

I did test using IIS before uploading but surely that wouldn't make a difference.. would it?

Any help would be great.. :cool:

Btw.. I chose asp due to the fact its the only language of this type that I'm comfortable using and don't have time to look into php or asp.net.. :)
 
This is the code from the asp file, please ignore how untidy etc it is.. its just a quick test..

<%@ Language = "VBScript" %>

<%
Option Explicit

Dim conn
Dim Connect
Dim rstLogin
Dim strUsername, strPassword
Dim strSQL

%>

<html>
<head><title>Login Page</title>
</head>
<body>

<%
If Request.Form("action") <> "validate_login" Then
%>
<form action="test.asp" method="post">
<input type="hidden" name="action" value="validate_login" />
<table border="0">
<tr>
<td align="right">Login:</td>
<td><input type="text" name="login" /></td>
</tr>
<tr>
<td align="right">Password:</td>
<td><input type="password" name="password" /></td>
</tr>
<tr>
<td align="right"></TD>
<td><input type="submit" VALUE="Login" /></td>
</tr>
</table>
</form>
<%

Else

set conn = createobject("ADODB.Connection")
conn.open = "DRIVER={MySQL ODBC 3.51 Driver};"_
& "SERVER=**this is an ip address;"_
& "DATABASE=*******;"_
& "UID=giffarmadillo;PWD=******;"


strSQL = "SELECT * FROM tbluser " _
& "WHERE username='" & Replace(Request.Form("login"), "'", "''") & "' " _
& "AND password='" & Replace(Request.Form("password"), "'", "''") & "';"

Set rstLogin = conn.Execute(strSQL)

If Not rstLogin.EOF Then
%>
<p>
<strong>Welcome to the administrative section <%=Request.form("Login")%></strong>
</p>
<p>
In this section you will be able to dynamically program the site content and dramatically change the functionality of your website.
<br>
<br>
Below you will fin a list of the current data that is shown on your pages, to edit this data simply click the edit button next to the section you wish to edit.
<br>
<br>
If you have any problems using this area or any other queries then please contact me on
<form name="form2" method="post" action="">
<table width="701" height="213" border="1">
<tr>
<td><div align="center"><strong>Section Title </strong></div></td>
<td><div align="center"><strong>Current Data </strong></div></td>
<td><div align="center"><strong>Last updated </strong></div></td>
<td><div align="center"><strong>Edit?</strong></div></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</form>
<p>
<insert address>

<%
Else
%>
<p>

<p>
<font size="4" face="arial,helvetica"><strong>
Login Failed - Please verify username and password.
</strong></font>
</p>
<p>
<a href="login.asp">Retry</a>
</p>
<%
'Response.End
End If

' Clean Up
rstLogin.Close
Set rstLogin = Nothing
cnnLogin.Close
Set cnnLogin = Nothing
End If
%>

Any ideas?
 
Moredhel said:
ASP is a Microsoft language that only works on IIS on Windows... It's also pretty much a dead language nowadays so I would look at the newer ASP.NET frameworks, preferably with a language such as c# although again that's windows only. Or you could look at either PHP, Python or Ruby which work on any platform pretty much, OSX included. (Indeed, OSX comes with PHP 4.x, and building 5.1.x is quite simple).

There ARE open source versions of classic ASP, however they're not particularly good, don't have access to the Windows COM and aren't free...

The thing that confuses me though.. is that on my own hosting server it runs hassle free on either windows or mac.. ie to browse the page..

But once on the consumers hosting server it only works on a pc :confused:

The code works and is fine.. but only seems to want to work in windows.
I've contacted the hosting company and enabled asp/asp.net..
It just doesn't make sense.

I'm looking into learning asp.net atm and php but i've been drafted in freelance by a company at the last minute.. so I don't have the time to learn a new language.
They just asked me if I could code in dynamic content into a site.. I said yeah and they said well do it quickly please.. :)
 
Back
Top Bottom