Author Topic: Migrating script to Linux server  (Read 1460 times)

0 Members and 1 Guest are viewing this topic.

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Migrating script to Linux server
« on: December 10, 2007, 09:28:44 am »
Hey,

I was wondering, what are things that should be taken into consideration when migrating from a windows server to a linux one aside from capitalisation and arrayHigh being replaced with GetArrayLength(blah) - 1?

We've recently attempted running a script which ran nearly flawlessly on windows on linux but we get a lot of I/O error 103's which seems to break the scriptcore from executing the remaining part of the routines (resulting in more nasty problems elsewhere). We've checked capitalisation, permissions (full read & write in all the directories involved in reading and writing) and slashes and also replaced all instances of FileExists with checking whether the result of the readfile is not empty but to no avail. :(

Any help would be greatly appreciated.

Regards,
~ Sai`ke
« Last Edit: December 10, 2007, 09:31:29 am by sai`ke »
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Migrating script to Linux server
« Reply #1 on: December 10, 2007, 10:09:45 am »
Your permissions are incorrect. IO Error 103 means the user running the soldatserver does NOT have permission to read/write to whatever file its trying to access. Causes can be either file in use by another program/user, or incorrect read/write permission.

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Re: Migrating script to Linux server
« Reply #2 on: December 10, 2007, 10:22:12 am »
Thanks for your help :)

Does this error also occur if the file does not exist? Because we do test whether the file exists by actually trying to read it already. We do this because we've heard FileExists doesn't work very well on Linux. I'm not sure how much of that is true though.

Also, could opening the same file twice in a row cause this problem? Does the script core continue execution of commands that follow the initial readfile when still reading a file? Hence causing it to try and read a file that is already in use by itself?
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline chrisgbk

  • Moderator
  • Veteran
  • *****
  • Posts: 1739
Re: Migrating script to Linux server
« Reply #3 on: December 10, 2007, 04:15:17 pm »
Thanks for your help :)

Does this error also occur if the file does not exist? Because we do test whether the file exists by actually trying to read it already. We do this because we've heard FileExists doesn't work very well on Linux. I'm not sure how much of that is true though.

Also, could opening the same file twice in a row cause this problem? Does the script core continue execution of commands that follow the initial readfile when still reading a file? Hence causing it to try and read a file that is already in use by itself?
It may happen if the file doesn't exist; not sure though.

Check that the files have the correct owner as well; if root owns the files the server can't open them.

Havrn't heard of any problems with FileExists.

If you want I can look over your script and see if I can find anything wrong, and test it; PM me if you like.

Offline sai`ke

  • Camper
  • ***
  • Posts: 318
  • Can't be arsed to remove christmas avatar
Re: Migrating script to Linux server
« Reply #4 on: December 11, 2007, 07:32:37 pm »
Okay, thanks man! We might take you up on that offer if we can't get it fixed with your tips. Appreciate it! Thanks :)
#soldat.ttw #ttw.gather --- Quakenet!
http://ttwforums.com

Offline poutch

  • Major(1)
  • Posts: 34
Re: Migrating script to Linux server
« Reply #5 on: December 11, 2007, 09:38:10 pm »
It all depends on the chmod of the files and directories and owner/groups of directories.

To read a file or try check if a file exist in a directory your user (or the user of the soldatserver owner) must have read and execution (+rx) rights in the directory.
www.pleez.fr .... coming soon

Offline spkka

  • Camper
  • ***
  • Posts: 469
Re: Migrating script to Linux server
« Reply #6 on: December 13, 2007, 12:41:17 pm »
The soldatserver owner can assure me thats its good.. He Chmodded all files to 777.
But the error is still there... Try something with try..except now

Date Posted: December 12, 2007, 05:37:17 am
meh ok so after lots of trying i discovered i had the same i/o 103 errors on a fresh installed soldat server. I changed the readfile() <> '' with fileExists and now it seems to work on this OS.