0

I moved my codeigniter project from a microsoft azure server on to a new dedicated server. However I am getting nothing but issues. The site worked absolutely perfect on the azure server, none of the files have been changed or anything - but it just don't seem to work.

I first started getting errors saying that the Model can't be found, (i am still trying to fix this)

https://stackoverflow.com/posts/comments/103619729?noredirect=1

and now the latest error i get when going to a different page on my site i get

An uncaught Exception was encountered

Type: ParseError

Message: syntax error, unexpected ''

File: public_html/index.php

Line: 319

Function: require_once

I then looked at index.php and the line in question is :

require_once BASEPATH.'core/CodeIgniter.php';

any ideas what I can do to fix this? is it something to do with how my server is setup? do i need to change something in Apache?

Please help!

Community
  • 1
  • 1
  • 1
    _“none of the files have been changed or anything”_ - sure about that? How exactly did you “move” the whole thing …? `unexpected ''` looks like an issue with “invisible characters” or byte values that might have made their way into the files somehow. An actually empty string of zero length is so non-existent, that it could hardly ever occur “unexpectedly” somewhere. So there’s probably something between those two single quotes, that can’t be seen. Suggest you start by downloading that script file from the server, and look at what it actually contains using a hex editor … – 04FS Nov 01 '19 at 14:37
  • Hmm... If everything was working, and you changed your server and it stopped working, it can be either because of some invisible characters or bad encoding... Or maybe you are using in the start of your file and forgot to enable short tags (https://stackoverflow.com/questions/2185320/how-to-enable-php-short-tags) in the new server. – Lucas Meine Nov 01 '19 at 14:39
  • I just downloaded everything through filezilla FTP and then reuploaded to FTP on the new server. It's weird cause most of the site works and some pages load, but any with models don't and any they post via ajax to a controller for example give me the error above – Jack Daniels Nov 01 '19 at 14:40
  • i checked my PHPini file and i have this set : short_open_tag = On – Jack Daniels Nov 01 '19 at 14:41
  • what are the CI version and PHP version? – Vickel Nov 01 '19 at 15:30

0 Answers0