Jump to content
Larry Ullman's Book Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by Edward

  1. I think everyone would love to see you write a book on a fully developed website using oop code. There are also only two Yii Framework books available right now, I'm sure if you did one it would be a big hit. Even making a full working site using oop code intergrating into Yii.
  2. Are you using Yii or any other kind of framework for your projects?
  3. That has done the trick, in the book they just used $newProject=new Project; So i missed out the semi colon. Well either way you can put Project or Project() they both do the same thing. Thanks Paul well spotted.
  4. Yesterday i experienced the worst day ever, i had to install PEAR, then PHPUnit and lastly Selenium. Well i started out early working through Agile Web Application Development with Yii and PHP. Anyway i got stuck on installing PEAR, then it looked like it installed, and i was working on PHPUnit and that looked like it installed but i was continuously getting errors and fixing errors. After hours and hours of going through online help and getting error after error i got to the point at which there was no more help. I was completely stressed out, i had been working on this for around 5 hours, i had a major headache. I don't know about PEARS, but this was driving me Banana's. I decided after a short break that the best thing would be to reinstall install XAMPP completely, so i downloaded there most up to date version. Finally after i got that installed, i found that PEAR and PHPUnit were already all setup, i was like whall this is just amazing, i spend almost 6 hours messing around and then it all works in one go with the new XAMPP. Well regardless of what happened i did feel satisfied when i finally got it installed after all that time spent. Okay for those of you working through Yii, i have a question, im on page.70 (Agile Web Application Development with Yii and PHP), using PHPUnit to run a test on a ProjectTest.php in command prompt we need to type in % cd Webroot/protected/tests % phpunit unit/ProjectTest.php in after running this im getting an error Parse error: syntax error, unexpected T_VARIABLE C:\xampp\htdocs\yii\trackstar\protected\tests\unit\ProjectTest.php on line 8 here is a copy of ProjectTest.php <?php class ProjectTest extends CDbTestCase { public function testCRUD() { //Create a new project $newProject=new Project $newProjectName = 'Test Project 1'; // Line 8 $newProject->setAttributes( array( 'name'=> $newProjectName, 'description' => 'Test project number one', 'create_time' => '2010-01-01 00:00:00', 'create_user_id' => 1, 'update_time' => '2010-01-01 00:00:00', 'update_user_id' => 1, ) ); $this->assertTrue($newProject->save(false)); } } Do you know what the problem is here?
  5. This is an interesting question. I will be interested to hear what Larry has to say for this. If you look at the most popular sites online it has taken them at least 10 years to build up a massive community. I guess the best way for this is to start out small and restructure the tables later on if the site is to become so massively popular. Search optimization and marketing takes time a few years to work well, since now there are so many websites, so unless you have large money to invest and possibly get some adds on the TV, i guess this is something that shouldn't be worried about right now. Just keep things as simple as possible.
  6. Can i just interrupt please! I thought you might like to see this, its something we are all waiting for: http://www.amazon.co...28470294&sr=8-5 I also noticed you had finished the 3rd Edition book, well i just recently received the 4th Edition, and in there is a chapter on jquery, this is a javascript library that have been made for us to use so we don't need to reinvent the wheel.
  7. Thanks the Design Patterns book i will look into, currently i will be starting of with OOP in Larry's PHP Advanced book, then i will proceed on to the David Powers book.
  8. Excellent, i also have the DW IDE, its awesome. Don't worry about the silly mistakes i tripped up on a few of these issues myself.
  9. Well this is error is indicating that the index.php require is not locating the config.inc.php file at that location, and therefore your receiving the Fatal error. Your index.php file should be below the includes directory and in your html root directory. require ('./includes/config.inc.php'); I am using XAMMP and this is my location of config.inc.php This should be a simple case of just tiding up file locations and moving files.
  10. I got my PHP and MySQL for Dynamic Web Sites (4th Edition) in yesterday with 3 of Larry Ullman's other books, when i saw this book it has nearly brought tears to my eyes. I thought Effortless E-commerce was good, well this book just goes beyond awesome for me, it covers everything, more than everything. I really felt sad when i saw this book knowing that i learnt my stuff from another author's dynamic PHP and Mysql and saw how much stuff i have missed that was in Larry's book. I purchased all my books from Amazon and i did use the Click to view inside the book first before i bought, but its not the same looking at that and actually having the book to physically hold and feel. I was lucky to find Larry, i wish i could have found him earlier, but to anyone buying books on dynamic websites in mysql and php, this is a book that should certainly not be missed. If you buy another book and see this one, you are going to suffering from the same emotional regrets i have. Well my plan now is too read through this book because i don't want to miss anything, this knowledge is just too valuable. I rank Larry's work and performance at the same level as Yii Framework and Steve Jobs.
  11. If you are going to start learning the Yii Framework the following tutorials and books are recommended. Larry's Finest "Learning the Yii Framework Series" http://www.larryullm...-yii-framework/ "Awesome tutorials packed with more information on getting started on Yii than you will probably need" From the official Yii Framework Website the Screencasts http://www.yiiframew...om/screencasts/ "Simple video tutorials to start of with by Jefffrey Winesett" Two Yii books that can be purchased from Amazon.com http://www.amazon.co...28273173&sr=8-1 "A must have for everyone learning Yii by Jeffrey Winesett" http://www.amazon.co...28273173&sr=8-2
  12. Thanks Jonoathon, I am going to take your advise and start of with this one, it certainly does look easier to follow. Have you finished both of the David Powers and Matt Zandstra books. How about writing oop design patterns into your own site did you find those books provided enough info to get started?
  13. Thanks I have family in Oslo to. I just got object orientated solutions in today by David Powers and PHP Ojects, Patterns, and Practice by Matt Zandstra but not sure which one is best to read yet. I worked through a bit of the Object-Orientated with PHP 5 by Hasin Hayder a few months back but that book seemed to go on more about the php library to support oop. I am also working on Yii framework, I am aware it's not easy but Yii actually helps you to see where it is useful by extending their classes. You are right it seems to be difficult to learn oop and know how to use it for the bigger website.
  14. Thanks for getting that one in for us.
  15. Whoops i apologize i was in a rush earlier and misread your question. Yes you would really need to a have a strong foundation in php and mysql first before you look into frameworks. Larry has two awesome books that are worth checking out PHP for the Web (Fourth Edition) and PHP and MySQL for Dynamic Web Sites (Forth Edition).
  16. Change setting from this: define ('BASE_URI', 'http://localhost/'); define ('BASE_URL','/www/'); define ('MYSQL','/includes/mysql.inc.php'); to define ('BASE_URI', 'C:\xampp\htdocs'); define ('BASE_URL', 'http://localhost/'); define ('MYSQL', '/includes/mysql.inc.php');
  17. Hi Danny, yes if you are going to be building a fairly complex website, it would be best building into a framework, it will save you the time of reinventing the wheel, and not only that you website will be much more secure. you may find some this post helpful http://www.larryullm...-like-the-most/ I have not used frameworks myself before as you, but have had a look at Zend, Codeignitor and Yii. I have decided myself to go through with the Yii framework, it started up in 2008, so its not been around as long Zend, however the Yii guys have had time to rethink the structure of a framework and help us more with the common programming tasks. The other advantage of Yii is that it does allow you to incorporate Zend into it and it is Larry Ullman favorite framework a man of experience. If you are unsure of the MVC don't worry about that now, there are easy ways to see how that works with Yii framework for example you can check these out http://www.yiiframew...om/screencasts/ http://www.larryullm...-yii-framework/ Larry Ullman tutorials are in the second link which are well written. All of the frameworks Yii, Zend and Codeinigitor are based in object orientated code.
  18. Use these setting for the BASE contants: define ('BASE_URI', 'C:\xampp\htdocs'); define ('BASE_URL', 'http://localhost/'); After let us know what errors are still coming up. You may also get errors coming up as some of the database tables need to be populated before use.
  19. I would like to add a correction into this post i apologize for my silly mistake. The correct setting if you are using a localhost and you have placed your files in C:\xampp\htdocs\ should be: define ('BASE_URI', 'C:\xampp\htdocs\'); define ('BASE_URL', 'http://localhost/');
  20. I finished the screencasts at http://www.yiiframework.com/screencasts/ so i will be working through your tutorials today http://www.larryullman.com/series/learning-the-yii-framework/ I will let you know how it goes, okay i better get on Larry!
  21. Okay one more thing, what about the BASE_URL for a localhost, just put it like: define ('BASE_URL','http://localhost/knowledge_is_power/'); so Lynae should be define ('BASE_URL','http://localhost/'); "lol i have more problems with paths and directories than i do with programming, funny stuff this, yes it looks worrying but i do get it now. I just finished the knowledge is power site, so onto the MVC coffeeshop now with a bit more experience."
  22. Ah i know what i have done here, its a path not a url for BASE_URI, whoops define ('BASE_URI', 'C:\xampp\htdocs\knowledge_is_power');
  23. What do you have BASE_URI and BASE_URL values to be on your localhost Larry?
  • Create New...