Error: call to undefined function "var_dump"
4 posts
• Page 1 of 1
Error: call to undefined function "var_dump"
I try compiling script (Phalanger 3):
<?php
var_dump($_SERVER['argv']);
print 'Hello world!' . PHP_EOL;
by:
phpc /target:exe /root:. /recurse:. /static+ /debug- test.php
i copy PhpNetCore.dll to exe file directory
when execute program test.exe
then i got error
> Error: call to undefined function "var_dump"
same result for print_r($_SERVER['argv']);
> Error: call to undefined function "print_r"
and any other core function such a file_get_contents.
<?php
var_dump($_SERVER['argv']);
print 'Hello world!' . PHP_EOL;
by:
phpc /target:exe /root:. /recurse:. /static+ /debug- test.php
i copy PhpNetCore.dll to exe file directory
when execute program test.exe
then i got error
> Error: call to undefined function "var_dump"
same result for print_r($_SERVER['argv']);
> Error: call to undefined function "print_r"
and any other core function such a file_get_contents.
- IvanPanfilov
- Posts: 10
- Joined: July 26th, 2014, 7:05 am
Re: Error: call to undefined function "var_dump"
var_dump (and all other PHP functions) is defined in PhpNetClasslibrary.dll, you have to add a reference to this DLL into your .config file (<phpNet><classLibrary><add url="PhpNetClasslibrary.dll" />) or on cmd line /r:PhpNetClasslibrary.dll
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Error: call to undefined function "var_dump"
yes, it works finally.
i use this:
phpc /target:exe /root:. /recurse:. /static+ /debug- /r:path-to-dll/PhpNetCore.dll /r:path-to-dll/PhpNetClasslibrary.dll test.php
and still need copy PhpNetCore.dll, PhpNetClasslibrary.dll to exe folder.
Thanks.
i use this:
phpc /target:exe /root:. /recurse:. /static+ /debug- /r:path-to-dll/PhpNetCore.dll /r:path-to-dll/PhpNetClasslibrary.dll test.php
and still need copy PhpNetCore.dll, PhpNetClasslibrary.dll to exe folder.
Thanks.
- IvanPanfilov
- Posts: 10
- Joined: July 26th, 2014, 7:05 am
Re: Error: call to undefined function "var_dump"
/r:path-to-dll/PhpNetCore.dll is not needed.
Yes, if you would like to deploy your app without Phalanger installer, you have to bundle it with PhpNetCore.Parsers.dll, PhpNetCore.dll, PhpNetCoreClasslibrary.dll and used extensions (PhpNet*.dll)
Yes, if you would like to deploy your app without Phalanger installer, you have to bundle it with PhpNetCore.Parsers.dll, PhpNetCore.dll, PhpNetCoreClasslibrary.dll and used extensions (PhpNet*.dll)
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests