1

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.

Robert McCabe
  • 495
  • 1
  • 4
  • 21

1 Answers1

0

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">
Jakub Míšek
  • 1,036
  • 9
  • 12
  • Thanks, the line got remove from my config. Where does Phalanger look for dll's listed there? – Robert McCabe Jun 22 '16 at 19:51
  • Phalanger uses .NET to resolve assemblies. So in case of web application (ASP.NET pipeline), it looks in Global Assembly Cache (C:\Windows\Microsft.NET) and in web root Bin folder. – Jakub Míšek Jul 17 '16 at 09:47