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
tristanlee85
Forum Contributor
Posts: 172 Joined: Fri Dec 19, 2003 7:28 am
Post
by tristanlee85 » Mon Jun 26, 2006 10:48 am
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?
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Mon Jun 26, 2006 10:52 am
Is your website server Apache? If it is, check the disabled functions list through
phpinfo()
Jenk
DevNet Master
Posts: 3587 Joined: Mon Sep 19, 2005 6:24 am
Location: London
Post
by Jenk » Mon Jun 26, 2006 10:53 am
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 » Mon Jun 26, 2006 10:56 am
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 » Mon Jun 26, 2006 11:02 am
Hmm. This seems to work:
Code: Select all
include('/cgi-bin/filechucker/filechucker.cgi');