I’ve installed CI and it went smoothly, however as I’m going through the tutorial, I’m getting strange errors. Long story short, single-line quotes (both // and #) will cause the script to throw a syntax error:
Parse error: syntax error, unexpected $end in /home/mysitename/ci/application/controllers/pages.php on line 1
i.e., from the Static Pages tutorial, this bombs out:
$data['title'] = ucfirst($page); // Capitalize the first letter
...while this does not:
$data['title'] = ucfirst($page); /* Capitalize the first letter */
I’ve written plenty of from-scratch PHP and never encountered this problem. In fact, I have scripts with single-line comments running on my host as we speak.
The only thing I can think of as possibly being an issue: I don’t have CI running out of /public_html (as you may have noticed above). I installed /system and /application under /home/mysitename/ci (for security reasons as suggested in the installation instructions). I set the path variables in index.php accordingly (actually, I’m referring to it as index_ci.php). Could this configuration be causing some funkiness?
My host is running PHP 5.3.17, so I doubt it’s a version issue. I’m getting other weird issues, but I’ll leave it at this for now. Any light anyone can shed would be greatly appreciated; I’m excited to get started with CI but right now I feel like I’m tripping on my shoelaces as soon as the starter pistol goes off!