Entry
Fatal error: Call to unsupported or undefined function page_open() ? How do I fix this please...?
Feb 19th, 2008 22:10
dman, Philip Olson, Aral Balkan, Nazar Wahab, http://www.ttnr.org
The page_open() function is contained in the PHPLIB library (it opens a
new session). You need to install this library to get it working.
http://phplib.netuse.de/
If you have PHP4, you can use the built-in sessions functions instead
as that used to be the main reason people went with phplib and as
stated, page_open() is a phplib function that deals with that, see :
http://phplib.netuse.de/documentation/documentation-3.html#ss3.2
Regarding PHP4+ native sessions, check out :
http://www.php.net/manual/ref.session.php
http://www.faqts.com/knowledge_base/view.phtml/aid/6621
Now, let's assume we have a 'undefined function' problem and we can't
figure out why. Let's use page_open as an example.
Generally speaking, when one gets a undefined function error in PHP,
usually this has to do with an older version of PHP trying to run a
function which was implemented in a newer version but this is most
likely not the case here. page_open() is not a php function so this
issue can't be solved so easily. The script you're running is calling
on a function that does not exist (is not defined) so here are a few
options :
a. Locate this function and allow your page to access it.
A way to find "stuff" within a directory is to do this
(in *nix) :
grep -i page_open *
That will search (case insensitive) every file within the
directory you're calling it in, for the word : 'page_open' If
found, make sure it's finding its way to the file that's giving
you fits, most likely through an include file :
http://www.php.net/manual/function.include.php
b. Could be a mispelling of another function but I can't think
of what exactly. Have a look around similar functions, perhaps
one will be found. For example, if this script has to do with
PDF perhaps it's :
http://www.php.net/manual/function.pdf-open.php
Or, here are some other possible functions :
fopen : http://www.php.net/manual/function.fopen.php
popen : http://www.php.net/manual/function.popen.php
c. Reread your docs, are you missing a library or something?
d. Or, create the function page_open() :-)
Most likely the undefined function exists somewhere within the code, it
just isn't being included.
But as we now know, you'll need to either convert the application to
not use phplib OR install phplib on your system.