views:

156

answers:

4

Hi friends,

I have an interesting issue :/ I use CodeIgniter and the code below is working fine at my localhost, but when I upload to server I come cross with an error message like

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home3/blabla/public_html/blablabla/applications/frontend/models/our_work_model.php on line 99

function next_project($sort_work) 
    {

     $query = $this->db->select('wname')->order_by('sort', 'asc')->getwhere('works', array('sort >' => $sort_work, 'case_study != ' => ""), 1, 0); //line 99

any idea? appreciate helps! thanks!

A: 

I know chaining like that only works in PHP5 - is the server perhaps running an older version of PHP?

Al
at server, PHP version 5.2.9
artmania
A: 

Given your last question: http://stackoverflow.com/questions/1232601/construct-issue-for-php4-and-php5-maybe-an-another-reason

I'd say you're running PHP4.

jimyi
A: 

How do you know that your CodeIgniter installation is actually using PHP 5? It could be the case that there are several PHP installations in that machine. To test it, create a PHP file in your server with the following code:

<?php
phpinfo();
?>

Then let us know what version it is showing.

Randell
A: 

initially i was getting a blank page. so i removed this

error_reporting((E_ALL & ~E_DEPRECATED));

yes if you are using codeigniter and you have to make ove code to this

error_reporting((E_ALL));

and then you will get the error above. and i found it was due to php5 being unused.

bluepicaso