Call to undefined function: virtual()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tristanlee85
Forum Contributor
Posts: 172
Joined: Fri Dec 19, 2003 7:28 am

Call to undefined function: virtual()

Post by tristanlee85 »

Code: Select all

<?php
virtual("/cgi-bin/filechucker/filechucker.cgi");
?>
That code executes just fine on my localhost server, but when I upload it to my website, I get this error:

Code: Select all

Fatal error: Call to undefined function: virtual() in /home/turbosat/public_html/plastikracing/upload/upload.php on line 2
Why am I getting this error?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Is your website server Apache? If it is, check the disabled functions list through phpinfo()
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

From the manual:
This function is only supported when PHP is installed as an Apache module.
Most hosts install PHP as CGI, which is probably why virtual() is not working :)
tristanlee85
Forum Contributor
Posts: 172
Joined: Fri Dec 19, 2003 7:28 am

Post by tristanlee85 »

I assume that "Virtual Directory Support: disabled" is the reason?
tristanlee85
Forum Contributor
Posts: 172
Joined: Fri Dec 19, 2003 7:28 am

Post by tristanlee85 »

Hmm. This seems to work:

Code: Select all

include('/cgi-bin/filechucker/filechucker.cgi');
Post Reply