Getting "Call to undefined function: 'define': in phalanger web site

269 views Asked by At

I'm just starting out with Phalanger and hit a road block. I installed the latest from the Visual Studio Gallery and tried to create a simple web page. The sample web page that is create with a project works, but once I add to the index.php:

<?php
define("test","");
echo "Hello World!";
?>

I get :

 Call to undefined function: 'define' in c:\users\....

I can't seem to find a reference on the web to this issue, so I must have a setup wrong. Almost the same code works when I do this in a console app.

1

There are 1 answers

2
Jakub Míšek On

All the functions are defined in external libraries. While it should be set by default, ensure following is in your web.config file, under phpNet/classLibrary section:

<phpNet><classLibrary><add assembly="PhpNetClassLibrary, Version=4.0.0.0, Culture=neutral, PublicKeyToken=4af37afe3cde05fb">