error after install on localhost

Error after install on localhost, a forum discussion on Jojo CMS. Join us for more discussions on Error after install on localhost on our Installation forum.

Back to Forum Index : Back to Installation   RSS
raulandres

17 Feb 2010
Posts: 35

hello after download jojocms my online website production and config on localhost, its fail, all jojocms requirements is checked and fix on my local server, but when browse localhost/mysiteonlocal fail.

i run setup and nothing, i change config.php to link my local database, review phpinfo() config and all jojo requirements is ok.

Parse error: syntax error, unexpected ':' in /home/rag/www/jojocms/includes/jojo.php on line 93

what about this error? thx...
tom

Developer

tom

17 Feb 2010
Posts: 379

if you open the config.php file in the web root folder you should have a line in there like:
define('_SITEURL', 'http://localhost/mysite');

can you post what you've got for that line?
I suspect there's something like an extra ' in there.
Rick Rick

17 Feb 2010
Posts: 336

That's from the evolved short if statement syntax in PHP5.3 that the trunk now requires. And you're running PHP5.2.something.

I ran into this recently.

You can either grab a copy of PHP5.3 or use the 1.0 branch of Jojo.

You could go through and change all the statements to be compatible but that'd be counter productive to future upgrades.
raulandres

17 Feb 2010
Posts: 35

tom my _SITEURL is ok

rick right, i think on this you say me, but look, its rare because my production online website has PHP Version 5.2.12, and localhost php PHP Version 5.2.4-2ubuntu5.6.

An in production with PHP Version 5.2.12, its work.

Anyway any version of jojo i tried fail with this type of syntax, i think so is a problem on my php config on localhost, but i dont know what is the solution.

thx tom, rick
tom

Developer

tom

17 Feb 2010
Posts: 379

it fails on the rc2 version? that should be fine with 5.2. Trunk definitely needs 5.3

the bit i don't quite understand is why it's hitting line 93. If _SITEURL is defined in config.php it shouldn't go to line 93 because line 92 wouldn't be true:
if (!defined('_SITEURL')) {
and it should try and find the siteurl from the option table in the database

can you post what you have at line 93 in the install you're using?
and check if you have anything set in the option table for siteurl?
raulandres

17 Feb 2010
Posts: 35

line 93: $uri = $uri ?: '';
its like need php5.3

cat version.txt: 1.0rc1

option table siteurl: http://localhost/ec

now i config to php5.3...

thx tom
raulandres

18 Feb 2010
Posts: 35

now, with php5.3.0 installed, pass 93 line error... but i get another error on 363 line with a line with mysql_connect function.

I look around and discover that php5.3 use mysqlnd version, embebbed version, and this version doesnt work all mysql functions.

how to change to libmysql standard on ubuntu, now i have a roll

thx
tom

Developer

tom

18 Feb 2010
Posts: 379

Mike will have a better idea about that than i will, but..

trunk is NOT stable, not even close - even if you solve that issue, there will be many more.

Mike is re-writing large parts of Jojo in the trunk copy to allow for multi-domain installs (which is why _SITEURL is no longer defined in config.php) and it's quite a long way off being complete. Large parts of the interface still need work to take multi-domain/region/language handling into account, and almost none of the plugins have been updated to work with it yet so they will fail too.

For the moment, unless you're installing trunk to help with development, it should be avoided.

The Branch 1.0 version in svn is stable and works with 5.2, and it's this version that is being used for tagging releases. The current branch copy fixes a number of annoying bugs that were in rc2.
raulandres

18 Feb 2010
Posts: 35

but tom i dont use trunk version, i use rc1 or rc2, and any works with my php on local.

one question, what php version is neccesary to run jojocms stable release? and the shortcut syntax, example "?:" not appear problems.

now, Im trying to uninstall php 5.3 and install again php5.2 but php5.2.12 because this version run fine on my production. Apart php5.3.0 has built-in mysqlnd version and i tell u before comment, mysql_connect doesnt works, its neccesary change mysql_connect calls to mysqli syntax on jojocms code. I get pass this errors, but later, i get a nice white page on my screen when browser http://localhost/ec, any page works, admin, when run setup appear only jojocms logo and sidebar, but main content is empty, white page.

i'll try to get learning more jojocms code and of course asap i try to contribute with code.

thx and regards
r.


tom

Developer

tom

18 Feb 2010
Posts: 379

line 93: $uri = $uri ?: '';
is in the trunk copy of jojo.php which is why i don't understand how it's there if you're not using a trunk copy..
this is php 5.3 syntax, a shortcut for
$uri = $uri ? $uri : '';
we figure that by the time trunk is ready for release as Jojo 2, 5.3 will be reasonably common in hosted environments.

rc2 has this at line 93
define('_SITEURL', Jojo::getOption('siteurl')); //set _SITEURL constant from database

and shouldn't use that shortcut syntax anywhere, so should work with 5.2
Back to Forum Index : Back to Installation   RSS
You must be logged in to post a reply



You need to Register or Log In before posting on these forums.