Making Liimonade work on simple IIS server?

41 views
Skip to first unread message

Lance Wicks

unread,
Oct 21, 2009, 9:19:29 AM10/21/09
to Limonade
Hi All,
I have been using Limonade to develop a small tool and it is great.
The small app I have written works perfectly on my development system
and test server.

Unfortunately for me, the target server is a IIS box which I only have
FTP access to.
At present I can't get it to work with Limonade has anyone tackled
this before? Any suggestions?

Throwing some print statements in limonade.php I can see it seems to
work ok right up to step 6.4.
I have not traced any further, but will probably do so later today.
Just wanted to see if anyone had bright ideas before I dug into it
anymore (or gave up and moved the site to another server). :-)

Any assistance would be great,

Lance

Fabrice Luraine

unread,
Oct 24, 2009, 6:23:48 AM10/24/09
to Limonade
Hello Lance,

i've never tried Limonade on IIS but i'll try to give you the help i
can.
First, does it display errors or just a blank screen ?

++
Fabrice

Lance Wicks

unread,
Oct 24, 2009, 4:57:46 PM10/24/09
to limo...@googlegroups.com
Hi Fabrice,
basically I get a blank screen.
If I put a "print 'test';" in limonade.php I see them, right up to "step
6.4" in it. Does that help at all?

Lance


Lance Wicks

unread,
Oct 24, 2009, 5:56:51 PM10/24/09
to Limonade
Hi Fabrice,
a little further examination:

I added:
print('.'.call_user_func($route['function']).'.');

On line 387 of limonade.php (immediately before step #6.4
and all I see is ".."

WHich to me suggests that call_user_func is returning nothing? Does
this help?

Lance

Lance Wicks

unread,
Oct 24, 2009, 6:04:40 PM10/24/09
to Limonade
Further... adding print($route['function']);
Displays "main_page"; which would be right for the name of the
function in my /controllers/main.php file which has this:

function main_page() {
return html('main.html.php');
}

Thoughts?

P.s. the source code is here: http://github.com/lancew/DojoList

Lance Wicks

unread,
Oct 24, 2009, 6:24:51 PM10/24/09
to Limonade
P.s. PHP Version 5.2.6 on the server if that makes a difference.
Windows NT ENVISAGE243 5.2 build 3790

Fabrice Luraine

unread,
Oct 26, 2009, 3:45:49 AM10/26/09
to Limonade
Hello,

i've posted a little guide to help debugging blank screens:
http://groups.google.fr/group/limonade/browse_thread/thread/cedcc0b707d6269d/f5cd5415d7246ade#f5cd5415d7246ade

can you test that ?

thx

Fabrice Luraine

unread,
Oct 27, 2009, 4:22:09 AM10/27/09
to Limonade
Hello Lance,

the problem has to do with with default configuration paths that don't
use the windows DIRECTORY_SEPARATOR '\' but the unix one '/'.
I made some changes to make it compatible. You can download the 0.4
branch http://github.com/sofadesign/limonade/tree/0.4 (not the master,
i haven't merged with it yet) and test it with your code.
Tell me if it's ok or not.

2009/10/26 Lance Wicks <judo...@gmail.com>:
> Hello,
>
> many thanks for that guide.
> I have implemented all the steps on the IIS server I am trying to work
> with and now see the following errors:
>
> \\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp/controllers/
> Warning:
> include(\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib/limonade/views/\_notices.html.php)
> [function.include]: failed to open stream: No such file or directory in
> \\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php
> on line 1347
>
> Warning: include() [function.include]: Failed opening
> '\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib/limonade/views/\_notices.html.php'
> for inclusion (include_path='.;C:\php5\pear') in
> \\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php
> on line 1347
>
> Warning:
> include(\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp/views/\default_layout.php)
> [function.include]: failed to open stream: No such file or directory in
> \\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php
> on line 1347
>
> Warning: include() [function.include]: Failed opening
> '\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp/views/\default_layout.php'
> for inclusion (include_path='.;C:\php5\pear') in
> \\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php
> on line 1347
>
> The url of the server I am working on is http://hampshirejudo.org.uk/lwtemp
>
> Your help is appreciated, I hope by getting this to work we can make
> Limonade even better perhaps by finding a way to make it work on IIS. :-)
>
> Lance

Lance Wicks

unread,
Oct 27, 2009, 7:35:43 PM10/27/09
to limo...@googlegroups.com
Hello Fabrice,

I have replaced my /lib with the lib from
http://github.com/sofadesign/limonade/tree/0.4

But sadly I am still getting errors:

Warning:
include(\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib/limonade/views/\_notices.html.php)
[function.include]: failed to open stream: No such file or directory in
\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php

on line 1340

Warning: include() [function.include]: Failed opening
'\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib/limonade/views/\_notices.html.php'
for inclusion (include_path='.;C:\php5\pear') in
\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php

on line 1340

Warning:
include(\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp/views/\default_layout.php)
[function.include]: failed to open stream: No such file or directory in
\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php

on line 1340

Warning: include() [function.include]: Failed opening
'\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp/views/\default_layout.php'
for inclusion (include_path='.;C:\php5\pear') in
\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php

on line 1340

Fabrice Luraine

unread,
Oct 28, 2009, 2:51:10 AM10/28/09
to Limonade
Can you check that line 319 in your limonade.php is

option('limonade_views_dir', dirname(__FILE__)."{$ds}limonade{$ds}
views{$ds}");

And make a simple test to check the DIRECTORY_SEPARATOR on your server

<?php

echo "DIRECTORY_SEPARATOR is " . DIRECTORY_SEPARATOR;

?>

thx

On Oct 28, 12:35 am, Lance Wicks <judoco...@gmail.com> wrote:
> Hello Fabrice,
>
> I have replaced my /lib with the lib fromhttp://github.com/sofadesign/limonade/tree/0.4
>
> But sadly I am still getting errors:
>
> Warning:
> include(\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib/lim onade/views/\_notices.html.php)
> [function.include]: failed to open stream: No such file or directory in
> \\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.p hp
> on line 1340
>
> Warning: include() [function.include]: Failed opening
> '\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib/limonade/v iews/\_notices.html.php'

Lance Wicks

unread,
Oct 28, 2009, 12:42:12 PM10/28/09
to limo...@googlegroups.com
Hi Fabrice,

I had forgotten to checkout the 0.4 branch in git before I copied the
lib dir to the server... doh!

Anyway, I have not put it in place and added the echo of the seperator.

Still erroring. :-(

Lance

DIRECTORY_SEPARATOR is \
Warning:
include(\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade\views\_notices.html.php)


[function.include]: failed to open stream: No such file or directory in
\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php

on line 1341

Warning: include() [function.include]: Failed opening

'\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade\views\_notices.html.php'


for inclusion (include_path='.;C:\php5\pear') in
\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php

on line 1341

Warning:
include(\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\views\default_layout.php)


[function.include]: failed to open stream: No such file or directory in
\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php

on line 1341

Warning: include() [function.include]: Failed opening

'\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\views\default_layout.php'


for inclusion (include_path='.;C:\php5\pear') in
\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php

on line 1341

Fabrice Luraine

unread,
Oct 28, 2009, 2:21:42 PM10/28/09
to Limonade
this has to do with file paths that uses are return somtimes with a \
and sometimes with a /...
... it's really messy and don't find any clear documentation about
that...
perhaps we can try convert thos path in unix ones, but i'm not sure
IIS understand that

<?php

function convert_to_unix_path($path)
{
return str_replace( "\\", "/", $path );
}

$path = convert_to_unix_path('\nas31ent\domains\h\hampshirejudo.org.uk
\user\htdocs\lwtemp\lib\limonade\views\_notices.html.php');

var_dump(file_exists($path));

?>

what this code snippet returns on your IIS server ?



On Oct 28, 5:42 pm, Lance Wicks <judoco...@gmail.com> wrote:
> Hi Fabrice,
>
> I had forgotten to checkout the 0.4 branch in git before I copied the
> lib dir to the server... doh!
>
> Anyway, I have not put it in place and added the echo of the seperator.
>
> Still erroring. :-(
>
> Lance
>
> DIRECTORY_SEPARATOR is \
> Warning:
> include(\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\lim onade\views\_notices.html.php)
> [function.include]: failed to open stream: No such file or directory in
> \\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.p hp
> on line 1341
>
> Warning: include() [function.include]: Failed opening
> '\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade\v iews\_notices.html.php'
> for inclusion (include_path='.;C:\php5\pear') in
> \\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.p hp
> on line 1341
>
> Warning:
> include(\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\views\d efault_layout.php)
> [function.include]: failed to open stream: No such file or directory in
> \\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.p hp
> on line 1341
>
> Warning: include() [function.include]: Failed opening
> '\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\views\default_ layout.php'

Lance Wicks

unread,
Oct 28, 2009, 2:29:39 PM10/28/09
to limo...@googlegroups.com
Hi,

running that returns: bool(true)


( http://hampshirejudo.org.uk/lwtemp/lwtest.php )

Lance

Fabrice Luraine

unread,
Oct 28, 2009, 2:43:45 PM10/28/09
to Limonade
ah! that's good news.
so i will normalize paths in a unix way, this will solve the problem

i'll prepare that tomorrow morning

++Fabrice

Lance Wicks

unread,
Oct 28, 2009, 7:01:30 PM10/28/09
to Limonade
Good News!
Can't wait.

Fabrice Luraine

unread,
Oct 29, 2009, 6:12:36 AM10/29/09
to Limonade
Hello Lance,

i've updated the 0.4 branch with fixes for IIS. You can download it
http://github.com/sofadesign/limonade/tree/0.4 and tell me if it's ok

++
Fabrice

Lance Wicks

unread,
Oct 29, 2009, 7:08:59 AM10/29/09
to limo...@googlegroups.com
Brilliant,
I shall update you as to how it works this afternoon.
Lance

Sent from my iPhone

On 29 Oct 2009, at 10:12, Fabrice Luraine <fabrice...@gmail.com>
wrote:

Lance Wicks

unread,
Oct 29, 2009, 11:46:28 AM10/29/09
to Limonade
So Close!!!

Now I get a blank page. I have followed the steps in the other thread
( http://groups.google.com/group/limonade/browse_thread/thread/cedcc0b707d6269d/f5cd5415d7246ade#f5cd5415d7246ade
) and sadly still get a blank page. :-(

Lance

On Oct 29, 10:12 am, Fabrice Luraine <fabrice.lura...@gmail.com>
wrote:
> Hello Lance,
>
> i've updated the 0.4 branch with fixes for IIS. You can download ithttp://github.com/sofadesign/limonade/tree/0.4and tell me if it's ok

Fabrice Luraine

unread,
Oct 29, 2009, 12:19:01 PM10/29/09
to Limonade
arf...
i need to view your code to go further.
Can you publish it ?

On Oct 29, 4:46 pm, Lance Wicks <judoco...@gmail.com> wrote:
> So Close!!!
>
> Now I get a blank page. I have followed the steps in the other thread
> (http://groups.google.com/group/limonade/browse_thread/thread/cedcc0b7...
> ) and sadly still get a blank page. :-(
>
> Lance
>
> On Oct 29, 10:12 am, Fabrice Luraine <fabrice.lura...@gmail.com>
> wrote:
>
>
>
> > Hello Lance,
>
> > i've updated the 0.4 branch with fixes for IIS. You can download ithttp://github.com/sofadesign/limonade/tree/0.4andtell me if it's ok

Lance Wicks

unread,
Oct 29, 2009, 12:31:04 PM10/29/09
to limo...@googlegroups.com
Hi,

yes it sure is, http://github.com/lancew/DojoList/tree/limonade4
This is the branch with your 0.4 branch code in it.

Hope it helps.

Lance

Fabrice Luraine

unread,
Oct 29, 2009, 12:41:10 PM10/29/09
to Limonade
Thhx,

now the idea is to disable the limonade error handler to see directly
php errors:
comment the line 335 in limonade

set_error_handler('error_handler_dispatcher', E_ALL ^ E_NOTICE);

if you still have a blank page, check your php configuration and
change it to show all errors

On Oct 29, 5:31 pm, Lance Wicks <judoco...@gmail.com> wrote:
> Hi,
>
> yes it sure is,http://github.com/lancew/DojoList/tree/limonade4

Lance Wicks

unread,
Oct 29, 2009, 1:02:32 PM10/29/09
to limo...@googlegroups.com
Hi,

that has worked ( http://hampshirejudo.org.uk/lwtemp ).
I get the following errors:


Warning:
include(/nas31ent/domains/h/hampshirejudo.org.uk/user/htdocs/lwtemp/lib/limonade/views/default_layout.php)


[function.include]: failed to open stream: No such file or directory in

\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php
on line 1340

Warning: include() [function.include]: Failed opening

'/nas31ent/domains/h/hampshirejudo.org.uk/user/htdocs/lwtemp/lib/limonade/views/default_layout.php'


for inclusion (include_path='.;C:\php5\pear') in

\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade.php
on line 1340


Lance

Fabrice Luraine

unread,
Oct 29, 2009, 1:14:54 PM10/29/09
to Limonade
Is /nas31ent/domains/h/hampshirejudo.org.uk/user/htdocs/lwtemp/lib/
limonade/views/default_layout.php the right path ?

<?php
$path = '/nas31ent/domains/h/hampshirejudo.org.uk/user/htdocs/lwtemp/
lib/limonade/views/default_layout.php';
if(file_exists($path)) include $path;
else echo "WRONG PATH : $path doesn't exist."
?>

if it can't include it, do you have more information about your host
paths from your hosting provider ?

On 29 oct, 18:02, Lance Wicks <judoco...@gmail.com> wrote:
> Hi,
>
> that has worked (http://hampshirejudo.org.uk/lwtemp).

Lance Wicks

unread,
Oct 29, 2009, 1:21:06 PM10/29/09
to limo...@googlegroups.com
Hi,

hampshirejudo.org.uk/lwtemp/lwtemp.php

:-(


Warning:
include(/nas31ent/domains/h/hampshirejudo.org.uk/user/htdocs/lwtemp/lib/limonade/views/default_layout.php)


[function.include]: failed to open stream: No such file or directory in

\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lwtemp.php
on line 3

Warning: include() [function.include]: Failed opening
'/nas31ent/domains/h/hampshirejudo.org.uk/user/htdocs/lwtemp/lib/limonade/views/default_layout.php'
for inclusion (include_path='.;C:\php5\pear') in

\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lwtemp.php
on line 3


Lance

Tomasz Wsuł

unread,
Oct 29, 2009, 1:28:24 PM10/29/09
to limo...@googlegroups.com
Dnia 2009-10-29, o godz. 17:21:06
Lance Wicks <judo...@gmail.com>:

Hi,
I have not used windows for long time, but does not "\\nas31ent\..."
points to network driver? Maybe it is not the same as "/nas31ent"?

(wild guessing)

Lance Wicks

unread,
Oct 29, 2009, 1:33:29 PM10/29/09
to limo...@googlegroups.com
Seems like some good guessing.
I changed my test file to read:

<?php
//$path =
'\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade\views\default_layout.php';
$path =
'//nas31ent/domains/h/hampshirejudo.org.uk/user/htdocs/lwtemp/lib/limonade/views/default_layout.php';
if(file_exists($path)) include $path;
else echo "WRONG PATH : $path doesn't exist.";


phpinfo();
?>

And I now get a blank page... but in the source I see:

<!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="<br />
<b>Fatal error</b>: Call to undefined function url_for() in
<b>\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade\views\default_layout.php</b>
on line <b>6</b><br />

:-)


Almost there?

Lance

Fabrice Luraine

unread,
Oct 29, 2009, 1:33:54 PM10/29/09
to Limonade
sure, but what i don't understand is that

file_exists('/nas31ent/domains/h/hampshirejudo.org.uk/user/htdocs/
lwtemp/lib/lim onade/views/default_layout.php');

returns true!


On 29 oct, 18:28, Tomasz Wsuł <2nick...@gmail.com> wrote:
> Dnia 2009-10-29, o godz. 17:21:06
> Lance Wicks <judoco...@gmail.com>:

Fabrice Luraine

unread,
Oct 29, 2009, 1:51:21 PM10/29/09
to Limonade
but I think about a pretty simple solution that may solved those paths
bugs and inconcistancies: setting explicitly all application paths in
a relative way


function configuration()
{
option('limonade_dir', file_path('lib'));
option('limonade_views_dir', file_path('lib', 'limonade', 'views'));
option('limonade_public_dir',file_path('lib', 'limonade',
'public'));
option('public_dir', file_path('public'));
option('views_dir', file_path('views'));
option('controllers_dir', file_path('controllers'));
option('lib_dir', file_path('lib'));
}



On 29 oct, 18:33, Lance Wicks <judoco...@gmail.com> wrote:
> Seems like some good guessing.
> I changed my test file to read:
>
> <?php
>   //$path =
> '\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonade\ views\default_layout.php';
>   $path =
> '//nas31ent/domains/h/hampshirejudo.org.uk/user/htdocs/lwtemp/lib/limonade/ views/default_layout.php';
>   if(file_exists($path)) include $path;
>   else echo "WRONG PATH : $path doesn't exist.";
>
>   phpinfo();
> ?>
>
> And I now get a blank page... but in the source I see:
>
> <!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="<br />
> <b>Fatal error</b>:  Call to undefined function url_for() in
> <b>\\nas31ent\domains\h\hampshirejudo.org.uk\user\htdocs\lwtemp\lib\limonad e\views\default_layout.php</b>
> on line <b>6</b><br />
>
> :-)
>
> Almost there?
>
> Lance
>
>
>
> Tomasz Wsuł wrote:
> > Dnia 2009-10-29, o godz. 17:21:06
> > Lance Wicks <judoco...@gmail.com>:

Lance Wicks

unread,
Oct 29, 2009, 2:47:48 PM10/29/09
to limo...@googlegroups.com
Hurrah!

It works!

http://hampshirejudo.org.uk/lwtemp
:-)

Thanks!


Fabrice Luraine

unread,
Oct 30, 2009, 4:01:44 AM10/30/09
to Limonade
Great!

Lance Wicks

unread,
Oct 30, 2009, 4:29:50 AM10/30/09
to limo...@googlegroups.com
Thanks for your help Fabrice.
Lots still to do in my code to make it more robust and to make it
easier to get working on LAMP or IIS.

Big relief to have proved my project can work on that target server.

Thanks again, if you ever need an IIS server to test against, let me
know.

Lance

Sent from my iPhone

On 30 Oct 2009, at 08:01, Fabrice Luraine <fabrice...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages