Welcome Guest, Not a member yet? Register   Sign In
Parse error: syntax error, unexpected $end in ...
#1

[eluser]Reynolds[/eluser]
CI version 1.5.4

Code:
Parse error: syntax error, unexpected $end in /<hidden>/libraries/URI.php on line 63

in my local computer, it is NOT showing any error... but after uploading to zendurl.com this error shows up...

after checking it long enough, i found the problem...

at line 32 of the URI.php

Code:
var    $keyval    = array();

I changed it to
Code:
var    $keyval;

I reported this to ask if I just did right... I'm just a bit worrying if this might generate bug on the other part of CI (which relies on this variable).


thanks,
#2

[eluser]coolfactor[/eluser]
The change you made should not be the source or solution for this problem. It was valid code. Did it make the problem go away?

I'd check your own files to make sure you have balanced brackets { and } everywhere.
#3

[eluser]Reynolds[/eluser]
[quote author="coolfactor" date="1188886989"]The change you made should not be the source or solution for this problem. It was valid code. Did it make the problem go away?

I'd check your own files to make sure you have balanced brackets { and } everywhere.[/quote]


the problem did go away...

yes, I had thought of brackets too, but having CI modules in mind, I only added a single view file, which only shows a random images, no class, no methods made...

though I modified the config file a bit...
Code:
&lt;?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
|    http://www.your-site.com/
|
*/
$url = $_SERVER['SERVER_NAME'];
$r = explode("/",$_SERVER['SCRIPT_NAME']);
$cnt = count($r)-1;
for($i = 0; $i<$cnt;$i++)
{

$url.=$r[$i] . "/";
}


$config['base_url']    = "http://" . $url;

//$config['base_url']    = "http://{$_SERVER['SERVER_NAME']}/portfolio/reynold.lariza/";
//.....
?&gt;

and the view file is...

[code]
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;reynold.lariza&lt;/TITLE&gt;
&lt;style type="text/css"&gt;

body {
background-color: #ffffff;
font-family: Lucida Grande, Verdana, Sans-serif;
font-size: 12px;
color: #4F5155;
}

a {
color: #003399;
background-color: transparent;
font-weight: normal;
}


code {
font-family: Monaco, Verdana, Sans-serif;
font-size: 10px;
color: #002166;
display: block;

}

&lt;/style&gt;

&lt;/HEAD&gt;
&lt;BODY&gt;
<br />
<br />
<div style="text-align:center;">
<img alt="reynold.lariza logo" src="&lt;?=$image_path?&gt;reynold.lariza-&lt;?=rand(5,10)?&gt;.png" />
<span style="position:relative;top:10px;"><code />Page rendered in {elapsed_time} seconds</code></span>
</div>


</center>
&lt;/BODY&gt;
&lt;/HTML&gt;
[code]

hmn.... i just noticed... I remembered somewhere about problem with short-tags, I'll take a look at it too "&lt;?"


Edit... my bad I re-checked and realized that after changing all the php short-tags to long form, the problem disappeared, so I returned URI.php to its original state.

thanks for noticing CF Smile
#4

[eluser]coolfactor[/eluser]
Yes, you know what they say. Sometimes shortcuts can end up taking longer. Smile




Theme © iAndrew 2016 - Forum software by © MyBB