Phalanger install issue

Discussion about the open-source Phalanger [?] project.

Phalanger install issue

Postby RobertMcCabe » June 21st, 2016, 8:43 pm

I installed the latest Phalanger and PHP tools from the Visual Studio Gallery. However I get
"Call to undefined function: 'strpos'" when I try to run even a simple web app:

default.php :
Code: Select all
    <title>PHP Test</title>
    if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) {
        echo 'You are using Internet Explorer.<br />';    }


Other PHP functions like define also give an undefined error, the echo alone works.
Aany ideas?
Posts: 1
Joined: June 21st, 2016, 8:37 pm

Re: Phalanger install issue

Postby Jakub Misek » July 1st, 2016, 9:40 am


You have to add reference to PhpNetClasslibrary.dll within your web.config. It should be added by default when creating new web project.

Add following into your web.config, into <configuration> section:
Code: Select all
<phpNet><classLibrary><add assembly="PhpNetClassLibrary, Version=, Culture=neutral, PublicKeyToken=4af37afe3cde05fb" /></classLibrary></phpNet>
Jakub Misek │ DEVSENSE s.r.o. |
User avatar
Jakub Misek
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 17 guests

User Control Panel


Who is online

In total there are 17 users online :: 0 registered, 0 hidden and 17 guests (based on users active over the past 5 minutes)
Most users ever online was 787 on May 12th, 2024, 11:50 am

Users browsing this forum: No registered users and 17 guests