Jump to content

Unix vs. Windows Server


pets2soul

Recommended Posts

Dear all,

 

I'm new to php programming, however, I have experience of successfully setting up a php website on a Unix web server.

 

Recently, it has been very frustrating trying to build a php website on a Windows server. No matter how I try, all the things that seem natural on Unix server became very difficult with Windows server...

 

Such as sending form mail through SMTP, setting up a table in MySQL...all I'm trying to do are basic php functions, but still they just don't work.

 

Are php scripts so different on Windows server from Unix server? Or it's just Windows server that's causing all the problem??

 

Thanks!

 

Link to comment
Share on other sites

On Windows you need to install Apache, PHP, & MySQL. You're best bet is to install one of the packaged sets such as xampp. Once you've done that, PHP acts pretty much the same.

 

I develop/test most of my code on Windows before uploading it to a Linux server with no problems.

 

Ken

Link to comment
Share on other sites

"Or it's just Windows server that's causing all the problem??"

 

If you want to get technical, it's lack of knowledge of Windows that is causing the problem.  You shouldn't be encountering any issues at all.

 

 

I do the same thing as Ken most of the time.  Dev on Windows, upload to linux.  0 problems so far caused by OSs not matching.

Link to comment
Share on other sites

First of all, I'm not the server manager, but I'm sure we have those installed, except phpmyadmin, it IS a pain without it! But with everything else installed there should be no problem setting up a table in a existing MySQL database with something like this:

<?php
$con = mysql_connect("localhost","user","password");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

// Create table
mysql_select_db("db_name", $con);
mysql_query("CREATE TABLE name
(
FirstName varchar(15),
LastName varchar(15),
OrchBand varchar(15),
PeopleId varchar(15),
PartYear YEAR,
CateName varchar(15),
Biography LONGBLOB,
PicURL varchar(15)
)") or die(mysql_error());  

echo "Table Created!";

mysql_close($con);
?>

 

Shouldn't it?

Link to comment
Share on other sites

Screw Windows, even if you get it to work, it can't be trusted.

 

Here's an alternative:

Installl VMWare + Linux Virtual Machine + configure some NAT. 

You'll have a perfectly good Linux to host the website on, plus it would be most secured.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.