Initial setup - requirements

57 views
Skip to first unread message

Aaron Moodie

unread,
Oct 23, 2009, 2:50:55 AM10/23/09
to Limonade
Hi,

Are there any initial requirements for Limonade in order to get it
running? The only example I've managed to get working so far is the
'hello world' one. When I try and others, I just get a blank page, and
when I try the isearch example, I get the following error:

Notice: Undefined offset: 512 in /Users/Aaron/Sites/limonade/isearch/
lib/limonade.php on line 1613

thanks, Aaron

Lance Wicks

unread,
Oct 23, 2009, 3:05:45 PM10/23/09
to Limonade
Hi Aaron,

I am far from an expert, but I've found that Limonade needs very
little (one of the reasons I started using it).
As the Hello World works I suspect that the error might be in your
isearch code perhaps?

Is it in a repository public somewhere? Then we could take a look,
else maybe include some code in an email?

Lance

Aaron Moodie

unread,
Oct 23, 2009, 6:38:20 PM10/23/09
to Limonade
Hi Lance,

thanks for the reply. The iSearch example is just one of the examples
on the site over on github - http://github.com/sofadesign/limonade-isearch-example
and when I try example01 http://github.com/sofadesign/limonade/tree/master/examples/example01/
i just get a blank page.

Thanks for your help.

Aaron

Lance Wicks

unread,
Oct 23, 2009, 6:58:24 PM10/23/09
to Limonade
Aaron
To be honest I have never tried the iSearch example.
I'll try it this weekend and see if it runs for me and let you know
how I get on.
Lance

Fabrice Luraine

unread,
Oct 24, 2009, 6:10:34 AM10/24/09
to Limonade
Hello,

about your "Notice: Undefined offset: 512 in /Users/Aaron/Sites/
limonade/isearch/
lib/limonade.php on line 1613", it's an old Limonade bug. So i've
upgraded iSearch with latest Limonade (0.4.5); it's solved now.

About your blank page with example01, it's very strange. Could you
give us more informations about your configuration (OS, php version,
web server...) ?

Fabrice.

Francesc Esplugas

unread,
Oct 24, 2009, 12:42:03 PM10/24/09
to Limonade

Same problem here I'm working on Snow Leopard, and the only example
working is the Hello World one.

Francesc Esplugas

unread,
Oct 24, 2009, 1:00:12 PM10/24/09
to Limonade

If it helps I'm getting as an error page this:

--
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Limonade, the fizzy PHP micro-framework</title>
<link rel="stylesheet" href="" type="text/css" media="screen">
</head>
<body>
<div id="header">
<h1>Limonade</h1>
</div>

<div id="content">
<?php= error_notices_render(); ?>
<div id="main">
<?php= $content;?>
<hr class="space">
</div>
</div>

</body>
</html>
--

On 24 oct, 18:42, Francesc Esplugas <francesc.esplu...@gmail.com>
wrote:

Aaron Moodie

unread,
Oct 24, 2009, 8:22:42 PM10/24/09
to Limonade
Hi guys, thanks for the responses. I'm on OSX 10.5.8 running PHP 5.2.8
on a localhost Apache server.

I've downloaded the new iSearch example. I'm no longer getting that
error, but am now getting a blank page as will all the other
examples.

Aaron

Aaron Moodie

unread,
Oct 25, 2009, 9:15:20 AM10/25/09
to Limonade
playing around a bit further, I set up a virtual host for my limonade
app, and still not having any luck getting past the 'hello world'
demo. I added in a second function:

dispatch('/bye', 'bye');

function bye() {
return 'good bye';
}

which when I try and run I get a 404 error.

Fabrice Luraine

unread,
Oct 26, 2009, 3:29:55 AM10/26/09
to Limonade
The php code isn't even interpreted. Are you sure your php
installation is ok ?
What is the code that renders this page ?

On 24 oct, 18:00, Francesc Esplugas <francesc.esplu...@gmail.com>
wrote:

Fabrice Luraine

unread,
Oct 26, 2009, 3:39:50 AM10/26/09
to Limonade
Hello,

here's a little guide that will help to solve blank pages

1. First, Limonade disables error display for security concerns. So
let's enable errors just after limonade include

require_once('lib/limonade.php');
ini_set('display_errors', 1);

2. Be sure to run your app in development mode by adding this option
in your configuration

function configuration()
{
option('env', ENV_DEVELOPMENT);
}

3. Check if the run() function is called at the end of your app main
file
4. If you still have blank page, we'll restore the default error
handler

function before()
{
restore_error_handler();
}


So, what error return now ?

Francesc Esplugas

unread,
Oct 26, 2009, 4:25:25 AM10/26/09
to Limonade

I've php running in my computer, for example Wordpress & Akelos
Framework are running properly.

The simple code I'm testing is the following. http://pastie.org/private/pkckpile5h0xegs9dgfa

The hello_world works but ?/hello/world is returning "Hello $name".
The error page shows the code uncompiled.

Fabrice Luraine

unread,
Oct 26, 2009, 4:29:30 AM10/26/09
to limo...@googlegroups.com
return 'Hello $name'; # variables aren't interpreted in single quotes strings

you should write

return "Hello $name";

2009/10/26 Francesc Esplugas <francesc...@gmail.com>:
--
Fabrice Luraine
----------------------
06 62 26 79 71
02 23 42 15 61
http://pok.tumblr.com

Francesc Esplugas

unread,
Oct 26, 2009, 4:31:45 AM10/26/09
to Limonade

If it helps, the example aren't working on my default php setup on
Snow Leopard. If get the following error.

Parse error: syntax error, unexpected $end in <RouteToLimonade>/
examples/example01/index.php on line 125


On 26 oct, 09:25, Francesc Esplugas <francesc.esplu...@gmail.com>
wrote:
> I've php running in my computer, for example Wordpress & Akelos
> Framework are running properly.
>
> The simple code I'm testing is the following.http://pastie.org/private/pkckpile5h0xegs9dgfa

Fabrice Luraine

unread,
Oct 26, 2009, 4:31:46 AM10/26/09
to Limonade
return 'Hello $name'; # variables aren't interpreted in single quotes
strings

you should write

return "Hello $name";

On Oct 26, 9:25 am, Francesc Esplugas <francesc.esplu...@gmail.com>
wrote:
> I've php running in my computer, for example Wordpress & Akelos
> Framework are running properly.
>
> The simple code I'm testing is the following.http://pastie.org/private/pkckpile5h0xegs9dgfa

Fabrice Luraine

unread,
Oct 26, 2009, 4:47:20 AM10/26/09
to Limonade
The PHP bundled with Snow Leopard is 5.3
In PHP 5.3, the short_open_tag option is disabled by default. So you
can't write <? ... ?> or <?= ... ?>
Limonade and some examples are using this syntax.
You must enable this option in your php.ini (see there
http://wordpress.org/support/topic/306878 )
or before including limonade, just add

ini_set('short_open_tag', 1);



On Oct 26, 9:31 am, Francesc Esplugas <francesc.esplu...@gmail.com>
wrote:

Francesc Esplugas

unread,
Oct 26, 2009, 5:13:31 AM10/26/09
to limo...@googlegroups.com
On Mon, Oct 26, 2009 at 9:47 AM, Fabrice Luraine
<fabrice...@gmail.com> wrote:

> The PHP bundled with Snow Leopard is 5.3
> In PHP 5.3, the short_open_tag option is disabled by default. So you
> can't write <? ... ?> or <?= ... ?>

> Limonade and some examples are using this syntax.
> You must enable this option in your php.ini (see there
> http://wordpress.org/support/topic/306878 )
> or before including limonade, just add

> ini_set('short_open_tag', 1);

"It's currently still supported for backwards compatibility, but we
recommend you don't use them."

Is it really necessary to use them?

Fabrice Luraine

unread,
Oct 26, 2009, 5:20:23 AM10/26/09
to Limonade
i'll remove them from default views
http://sofadesign.lighthouseapp.com/projects/29612/tickets/34-short-open-tags-use-in-default-limonade-views#ticket-34-1
so you'll have the choice to use them or not in your code.

On Oct 26, 10:13 am, Francesc Esplugas <francesc.esplu...@gmail.com>
wrote:
> On Mon, Oct 26, 2009 at 9:47 AM, Fabrice Luraine
>

Aaron Moodie

unread,
Oct 26, 2009, 5:33:37 AM10/26/09
to Limonade
Hi Fabrice,

I definitely have PHP working. I have wordpress installed locally,
which is running fine. I tried out the isearch example on my (mt)
server and it's working fine, though the example01 is still returning
a blank page even there.

I went through your steps. Step 2 was already included in the example
file, so I replaced it with step 4, but am still getting a blank page.
The <head> and <body> are completely empty when I view the source on
example01, and in the iSearch example, I can see that the <head> is
loading, but the <body> contains only -

<body onclick="console.log('Hello', event.target);"
orient="landscape">
<div id="preloader"/>
</body>

Thanks for your help.

Aaron


Francesc Esplugas

unread,
Oct 26, 2009, 5:34:44 AM10/26/09
to limo...@googlegroups.com
When a template is not found, limonade returns a white page ... is
that the expected behavior?

Fabrice Luraine

unread,
Oct 26, 2009, 6:14:08 AM10/26/09
to Limonade
no, you should see your template file name

On 26 oct, 10:34, Francesc Esplugas <francesc.esplu...@gmail.com>
wrote:

Fabrice Luraine

unread,
Oct 26, 2009, 6:18:38 AM10/26/09
to Limonade
Hello Aaron,


let's see that step by step: checking Limoande installation with a
simpliest example, then working on example01, then finaly iSearch
could you try that:

require_once 'lib/limonade.php';
dispatch('/', 'hello');
function hello()
{
return 'Hello world!';
}
run();

Francesc Esplugas

unread,
Oct 26, 2009, 6:25:43 AM10/26/09
to limo...@googlegroups.com
I got that working ...

Aaron Moodie

unread,
Oct 26, 2009, 7:14:00 AM10/26/09
to Limonade
Hi Fabrice,

Yes, same here. 'Hello World' all working fine.


Aaron

On 26 oct, 21:25, Francesc Esplugas <francesc.esplu...@gmail.com>
wrote:
> I got that working ...
>
> On Mon, Oct 26, 2009 at 11:14 AM, Fabrice Luraine
>

Fabrice Luraine

unread,
Oct 26, 2009, 8:37:33 AM10/26/09
to Limonade
and about example01 ?

Aaron Moodie

unread,
Oct 26, 2009, 9:00:32 AM10/26/09
to Limonade
Example01 still now working. I tried re-downloading it and still just
getting a blank page.

with the hello world example, I added in another dispatch, which when
I called, redirected me to the root(default) localhost page. This only
happens on the helloEveryone example. I tried the same code on my
server, and it works on the Hello World, but I get a 500 Server Error
on the helloEveryone


<?php

require_once 'lib/limonade.php';

dispatch('/', 'hello');
function hello() {
return 'Hello world!';
}

dispatch('/hello/:name', 'helloEveryone');
function helloEveryone() {
$name = params('name');
return 'Hello $name';
}

run();

?>



On Oct 26, 11:37 pm, Fabrice Luraine <fabrice.lura...@gmail.com>
wrote:

Fabrice Luraine

unread,
Oct 26, 2009, 1:44:36 PM10/26/09
to Limonade
ok,

let's see now what happens with this 500 Server Error

<?php
require_once 'lib/limonade.php';

function configuration()
{
option('env', ENV_DEVELOPMENT);
}

dispatch('/', 'hello');
function hello() {
return 'Hello world!';
}
dispatch('/hello/:name', 'helloEveryone');
function helloEveryone() {
$name = params('name');
return 'Hello $name';
}
run();
?>

Aaron Moodie

unread,
Oct 26, 2009, 8:54:48 PM10/26/09
to Limonade
Hey Fabrice,

Still getting the 500 error. This is what is on the page. Would this
have anything to do with the .htaccess file?

---
Internal Server Error

The server encountered an internal error or misconfiguration and was
unable to complete your request.

Please contact the server administrator, webm...@aaronmoodie.com and
inform them of the time the error occurred, and anything you might
have done that may have caused the error.

More information about this error may be available in the server error
log.
Apache/2.0.54 Server at www.aaronmoodie.com Port 80
---

Fabrice Luraine

unread,
Oct 27, 2009, 3:08:52 AM10/27/09
to Limonade
Hello Aaron,

it's an apache error, not a Limonade one; so yes, maybe it have to do
with your .htaccess

On Oct 27, 1:54 am, Aaron Moodie <aaronmoo...@gmail.com> wrote:
> Hey Fabrice,
>
> Still getting the 500 error. This is what is on the page. Would this
> have anything to do with the .htaccess file?
>
> ---
> Internal Server Error
>
> The server encountered an internal error or misconfiguration and was
> unable to complete your request.
>
> Please contact the server administrator, webmas...@aaronmoodie.com and
> inform them of the time the error occurred, and anything you might
> have done that may have caused the error.
>
> More information about this error may be available in the server error
> log.
> Apache/2.0.54 Server atwww.aaronmoodie.comPort 80
Reply all
Reply to author
Forward
0 new messages