Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Strange Difference In Beforefind Between Dev And Prod

$
0
0
I've hit a problem which has me stumped on deploying a project;

I have a LEFT JOIN which is applied to all queries in a certain context (see bottom of post) it works perfectly in my dev environment (Vagrant VM running Ubuntu / Nginx Php5-fpm 5.3.10 ) but on my production server (Debian / Nginx Php5-fpm 5.4.10) although the beforeFind function is called the JOIN isn't added onto the query.

Both machines running Yii 1.1.13


public function beforeFind(){
		
		parent::beforeFind();
		$controller=Yii::app()->getController();
		if(isset($controller->domain) && $controller->domain != false){

			 $criteria = new CDbCriteria;
			 $criteria->join='LEFT JOIN articles_sites ON id=articles_sites.article_id';
			 $criteria->condition='articles_sites.site_id='. $controller->domain;
	 
			 $this->dbCriteria->mergeWith($criteria);
		}

	}


Dev server - Ubuntu 12.04 LTS , Php 5.3.10-1ubuntu3.5
Prod server - Debian 6.0.6 , Php 5.4.10-1~dotdeb.0

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>