fourcs Posted August 6, 2008 Share Posted August 6, 2008 hi, I'm using the following IBM tutorial code for cakephp v. 1.2 <?php class Product extends AppModel { var $name = 'Product'; var $belongsTo = array ('Dealer' => array( 'className' => 'Dealer', 'conditions' => , 'order' => , 'foreignKey' =>'dealer_id')); } ?> I'm running slack 12.0, apache 3 and konquerer. ???It's giving me parse, syntax ',' errors on line 7. Can anyone give me some leads? Thanks Link to comment https://forums.phpfreaks.com/topic/118417-php5-parse-syntax-error-ibm-code/ Share on other sites More sharing options...
LemonInflux Posted August 6, 2008 Share Posted August 6, 2008 <?php class Product extends AppModel { var $name = 'Product'; var $belongsTo = array ('Dealer' => array( 'className' => 'Dealer', 'conditions' => '', 'order' => '', 'foreignKey' =>'dealer_id')); } ?> ---------------- Now playing: Enter Shikari - Mothership (Demo) via FoxyTunes Link to comment https://forums.phpfreaks.com/topic/118417-php5-parse-syntax-error-ibm-code/#findComment-609474 Share on other sites More sharing options...
fourcs Posted August 6, 2008 Author Share Posted August 6, 2008 Thanks for your expeditious reply. I tried the ' ' with the same results. Link to comment https://forums.phpfreaks.com/topic/118417-php5-parse-syntax-error-ibm-code/#findComment-609493 Share on other sites More sharing options...
LemonInflux Posted August 6, 2008 Share Posted August 6, 2008 class Product extends AppModel { var $name = 'Product'; var $belongsTo = array ('Dealer' => array ('className' => 'Dealer', 'conditions' => '', 'order' => '', 'foreignKey' =>'dealer_id')); } That works fine for me :/ ---------------- Now playing: Enter Shikari - Keep It On Ice (Zane Lowe BBC Session) via FoxyTunes Link to comment https://forums.phpfreaks.com/topic/118417-php5-parse-syntax-error-ibm-code/#findComment-609495 Share on other sites More sharing options...
fourcs Posted August 6, 2008 Author Share Posted August 6, 2008 Thanks again. Copied your code over and got the same results. I'm running php v 5.2.6. Link to comment https://forums.phpfreaks.com/topic/118417-php5-parse-syntax-error-ibm-code/#findComment-609505 Share on other sites More sharing options...
LemonInflux Posted August 6, 2008 Share Posted August 6, 2008 I'm on 5.2.4 and it works. Although that shouldn't make a difference. This is PHP4 code. I'm not sure. It works for me. Is that all the code you're using, or is there more you're not showing us? ---------------- Now playing: Flyleaf - All Around Me via FoxyTunes Link to comment https://forums.phpfreaks.com/topic/118417-php5-parse-syntax-error-ibm-code/#findComment-609508 Share on other sites More sharing options...
fourcs Posted August 6, 2008 Author Share Posted August 6, 2008 That's all the code in this file, which is used in a cakephp 1.2 app I'm working on. Link to comment https://forums.phpfreaks.com/topic/118417-php5-parse-syntax-error-ibm-code/#findComment-609510 Share on other sites More sharing options...
LemonInflux Posted August 6, 2008 Share Posted August 6, 2008 That's really odd. Well I don't know. It works for me, so I'm not sure what else I can do.. ---------------- Now playing: Flyleaf - There For You via FoxyTunes Link to comment https://forums.phpfreaks.com/topic/118417-php5-parse-syntax-error-ibm-code/#findComment-609511 Share on other sites More sharing options...
wildteen88 Posted August 6, 2008 Share Posted August 6, 2008 That's all the code in this file, which is used in a cakephp 1.2 app I'm working on. Can you post the link to the IBM article you're reading. Everything LemonInFlux suggested is vaild code. Can you also provide details how you're running the code too. Link to comment https://forums.phpfreaks.com/topic/118417-php5-parse-syntax-error-ibm-code/#findComment-609518 Share on other sites More sharing options...
fourcs Posted August 6, 2008 Author Share Posted August 6, 2008 Here's the link (they require logging in to see tutorial, hence the https) https://www6.software.ibm.com/developerworks/education/os-php-cake2/section3.html My error is produced at the browser, http://localhost/cake5/products. Link to comment https://forums.phpfreaks.com/topic/118417-php5-parse-syntax-error-ibm-code/#findComment-609526 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.