new tutorial; a todo app in 30 lines

262 views
Skip to first unread message

gabor

unread,
May 22, 2012, 2:53:48 PM5/22/12
to redbe...@googlegroups.com

Just posted a new tutorial for the absolute RedBeanPHP beginner; todo app in 30 lines.
Advanced stuff will follow later.

http://www.redbeanphp.com/manual/tutorial

The demo is here:

https://test-gabordemooij.rhcloud.com/todo.php

(running on the new RedHat OpenShift service ;))


Cheers,
Gabor

charlie

unread,
May 22, 2012, 7:34:51 PM5/22/12
to redbe...@googlegroups.com
Nice.


--
You received this message because you are subscribed to the Google Groups "redbeanphp" group.
To view this discussion on the web visit https://groups.google.com/d/msg/redbeanorm/-/BVyyhkvrjLUJ.
To post to this group, send email to redbe...@googlegroups.com.
To unsubscribe from this group, send email to redbeanorm+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redbeanorm?hl=en.

Nick Arellano

unread,
Jun 13, 2013, 3:24:56 PM6/13/13
to redbe...@googlegroups.com
First off Thank you for creating REDBeanPHP! I heard of it when installing DevShell. Now here is my problem with the tutorial. 

1. I can't figure out how to preload the database. My server is linux so R::setup(); should work. 
2. Everything else in the tutorial appears to work, as I can create the tags obviously without Joe, Pete, or Lenny since they are not there to select.
3. I went through other posts concerning the tutorial but did not see a similar question.
4. Here is my init.php file:
<?php

require('rb.php');
R::setup();
R::nuke();
foreach(array('Joe','Pete','Lenny') as $p) {
$person = R::dispense('person');
$person->name = $p;
R::store($person);
}

foreach(array('Feature','Bug','Research') as $c) {
$category = R::dispense('category');
$category->label = $c;
R::store($category);
}
$task = R::dispense('task');
$task->description = 'Deploy';
R::store($task);
?>

gabor

unread,
Jun 13, 2013, 6:36:00 PM6/13/13
to redbe...@googlegroups.com


Hi,

Might have something to do with the configuration of your Linux environment.
Setup creates a database file in /tmp. This *should* work on most distros.
Have you tried to connect to a mysql database?

cheers,
Gabor

Nick Arellano

unread,
Jun 13, 2013, 6:53:43 PM6/13/13
to redbe...@googlegroups.com
Yes without luck with this tutorial. But I didn't try more than once that said I have a bunch of db's on the server. What do I need to look for in the configuration?

Nick Arellano

unread,
Jun 13, 2013, 9:36:41 PM6/13/13
to redbe...@googlegroups.com
Also, if the yellow notes showup with the title wouldn't that indicate that the bd was being made?

gabor

unread,
Jun 14, 2013, 5:36:13 AM6/14/13
to redbe...@googlegroups.com

Some hosts flush the /tmp folder automatically for you after a script has finished....
After all it's a temporary folder. Have you tried using a different location on disk?

Nick Arellano

unread,
Jun 14, 2013, 10:11:11 AM6/14/13
to redbe...@googlegroups.com
There is a /tmp folder on the server and it has files that are years old in it. Does rbPHP create its own /tmp folder?

gabor

unread,
Jun 16, 2013, 9:48:00 AM6/16/13
to redbe...@googlegroups.com

No it's not.
To be honest I dont have a clue whats going wrong...

Nick Arellano

unread,
Jun 17, 2013, 10:51:18 AM6/17/13
to redbe...@googlegroups.com
OK. It connects using msql and rbPHP but the preassigned variables don't load. That said it is not important for the project I am working on so I'm good for now. Maybe I'll solve the problem down the road. 

Majid Tba

unread,
Jul 12, 2014, 10:05:35 PM7/12/14
to redbe...@googlegroups.com
tnx 
i need your code
i cant find them!
Reply all
Reply to author
Forward
0 new messages