Reputation: 113
I've found this free template for Joomla. There is a quickstart package to get a ready-to-go website, similar to the demo. First I've installed XAMPP v1.8.3 (with PHP v5.5.14) on my Windows pc and then I succesfully get the demo working on my localhost. Then I tried to move the website to my online host (Linux, PHP v5.5.11). I moved all the files with FileZilla and the local MySQL database with a sql script, as illustrated by Joomla. When I open the home page of my website I can't see the demo and I get this error instead:
Parse error: syntax error, unexpected end of file in /web/htdocs/www.mywebsite.com/home/modules/mod_otslideshow/classes/otimage.class.php on line 1
This is the content of the file:
<?php
/* Credits - cut -*/
defined('_JEXEC') or die('Restricted access');
class OTImage {
//cut
}
Brackets are ok. Notepad++ shows me that the last "}" closes the OTImage class (if you want the very long code of the class I can provide it). I'm not a PHP experts, but I noticed that there was a missing PHP close tag ?>. Then I read that it is not a syntax error. What could be the reason for this error? Localhost PHP version is similar to the remote host. Is it something related to the migration? Or something related to the php.ini? My provider gives me an option to change the php.ini: there are 5 options. The first two seems to be interesting. With the first (default one) - and also the others - I get the aforementioned error; with the second (joomla specific) I get no error, but I see a blank home page. By adding a final ?> to the class I'm able to see the homepage, but the slideshow (the module that is causing problem) doesn't work (I see all the images in the page, without the slider: the component is broken). I can't understand if there is an incompatibility or a programming error. Thanks in advance.
EDIT: phpcodechecker.com says that the code is syntatically correct.
Upvotes: 0
Views: 187
Reputation: 87
Usually this occurs when a php file is corrupted or not fully transfered.
Did you move the site via ftp.
If ftp then has it finished?
Did you got any errors on transfer?
Remember you have a "on line 1".
Upvotes: 1