Setting up Sectors --- STAGE 4
Creating Sol sector Created
Converting Sol Sector Id to 0 True
Creating Alpha Centauri in sector 1 Created
Inserting loop 1 of 3 Sector Block [2 - 499] into the Universe. Inserted
Inserting loop 2 of 3 Sector Block [500 - 999] into the Universe. Inserted
Inserting loop 3 of 3 Sector Block [1000 - 999] into the Universe. Inserted
Setting up Zone (Unchartered space) Set
Setting up Zone (Federation space) Set
Setting up Zone (Free-Trade space) Set
Setting up Zone (War Zone) Set
Setting up the 25 Federation Sectors Set
Loop 1 of 1 (Setting up Special Ports) Port [2 - 50] Selected
Loop 1 of 2 (Setting up Ore Ports) Block [1 - 500] Selected
Loop 2 of 2 (Setting up Ore Ports) Block [501 - 1000] Failed
Loop 1 of 2 (Setting up Organics Ports) Block [1 - 500] Failed
Loop 2 of 2 (Setting up Organics Ports) Block [501 - 750] Failed
Loop 1 of 2 (Setting up Goods Ports) Block [1 - 500] Failed
Loop 2 of 2 (Setting up Goods Ports) Block [501 - 1000] Failed
Loop 1 of 2 (Setting up Energy Ports) Block [2 - 500] Failed
Loop 2 of 2 (Setting up Energy Ports) Block [501 - 750] Failed
Each one of those failed errors gives me the same issue:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') or (port_type='none' and sector_id=) or (port_type='none' and sector_id=) or (' at line 1
Googling the error gave me a link to a forum thread on here, but due to the wipe, it has been lost.

Could I get some advice on how I (and possibly others with the same issue) could go about fixing this, or what I'm doing wrong?
EDIT: Forgot to mention, the server is using ubuntu 14.04 LTS + LAMP
Thanks
