An undefined function is a function that fails to execute when called due to the body of the function not being available to the program, compiler, or interpreter, looking for a function definition.
Questions tagged [undefined-function]
143 questions
                    
                    107
                    
            votes
                
                14 answers
            
        Undefined function mysql_connect()
I have ran aptitude install php5-mysql (and restarted MySQL/Apache 2), but I am still getting this error:
Fatal error: Call to undefined function mysql_connect() in /home/validate.php on line 21 
phpinfo() says the…
         
    
    
        user1765369
        
- 1,333
- 3
- 11
- 19
                    65
                    
            votes
                
                8 answers
            
        PHP fileinfo is undefined function
Whenever I try to get the mime content type from php, it echos:
Fatal error: Class 'finfo' not found in /home/jobynadel/finadel.com/video/finfo.php on line 4
or
Fatal error: Call to undefined function finfo_open in…
         
    
    
        Jobynad
        
- 651
- 1
- 5
- 3
                    30
                    
            votes
                
                3 answers
            
        Why does the C++ linker allow undefined functions?
This C++ code, perhaps surprisingly, prints out 1. 
#include 
std::string x();
int main() {
    std::cout << "x: " << x << std::endl;
    return 0;
}
x is a function prototype, which seems to be viewed as a function pointer, and C++… 
         
    
    
        chmullig
        
- 13,006
- 5
- 35
- 52
                    28
                    
            votes
                
                3 answers
            
        Undefined method 'pluralize' for #
        Not sure why this has decided to stop working.
customers_controller.rb
redirect_to customers_url,
            notice: pluralize(@imported_customers.size, "customer") + " imported!"
And I'm getting the error:
NoMethodError: undefined method…
         
    
    
        Wes Foster
        
- 8,770
- 5
- 42
- 62
                    23
                    
            votes
                
                1 answer
            
        Call to undefined function password_hash()
I am running php version 5.4.16 on localhost right now, while I am developing my site.  I want to use password_hash(), but I keep getting this error:
Fatal error: Call to undefined function password_hash() in /dir/to/file.php on line 123
Why is…
         
    
    
        user3162085
        
- 241
- 1
- 2
- 3
                    22
                    
            votes
                
                4 answers
            
        pcntl_fork() returning, Fatal error: Call to undefined function pcntl_fork()
I'm trying to fork a command line run XAMPP php process using pcntl_fork(). When I run the command below:
$pid = pcntl_fork();
if($pid == -1){
    file_put_contents('testlog.log',"\r\nFork Test",FILE_APPEND);
    return 1; //error
}
else if($pid){
 …
         
    
    
        Ben Pearce
        
- 6,884
- 18
- 70
- 127
                    8
                    
            votes
                
                1 answer
            
        Laravel: Call to undefined function Symfony\Component\Console\mb_convert_variables()?
I'm running a vanilla Amazon EC2 server.  I installed PHP 5.5.21 myself. My web application is built on Laravel.  For weeks, everything was working flawlessly.  Now, however, when running the Laravel command to update the database schema:
php…
         
    
    
        clone45
        
- 8,952
- 6
- 35
- 43
                    8
                    
            votes
                
                1 answer
            
        Are all unused undefined methods allowed?
Here’s a class with an undefined method. It seems compilers allow instances of this class to be constructed, so long as the undefined member function is never called:
struct A {
    void foo();
};
int main() {
    A a;      // <-- Works in both…
         
    
    
        CodeBricks
        
- 1,771
- 3
- 17
- 37
                    5
                    
            votes
                
                2 answers
            
        How to make function useable only for a certain data constructor of an ADT?
I'm currently playing around with ADTs in Haskell and try to build an ADT Figure:
data Figure = Rect { x :: Integer, y :: Integer, width :: Integer, height :: Integer}
            | Circle { x :: Integer, y :: Integer, radius :: Integer}
           …
         
    
    
        Markus Weninger
        
- 11,931
- 7
- 64
- 137
                    4
                    
            votes
                
                1 answer
            
        touchableopacity onpress function undefined (is not a function) React Native
I want to be able to navigate to a new screen after tapping the TouchableOpacity button but I receive an error which says
_this3.handleThisTap is not a function. (In '_this3.handleThisTap()','_this3.handleThisTap' is undefined)
import React, {…
         
    
    
        iprateekk
        
- 596
- 2
- 8
- 15
                    3
                    
            votes
                
                1 answer
            
        PHP Fatal error: Call to undefined function Laravel tinker
I'm trying to establish a relation between two tables (Roles and Abilities) but when I run the function allowTo() it says is undefined.
I tried to clear the cache and config but didn't do anything.
If anyone could help that'd be great, thanks!
Model…
         
    
    
        Becks
        
- 33
- 5
                    3
                    
            votes
                
                3 answers
            
        Angular 5 typeerror:
I am using Angular 5 in a project and i get a typescript error:
ERROR TypeError: Cannot read property 'indexOf' of undefined
What my code is supposed to do is to update the template on input change like this:
The template:
        
            
            
                
                    
    
    
         
    
    
                
            
        
    
 
    
    
        Gabriel
        
- 371
- 1
- 3
- 18
                    3
                    
            votes
                
                1 answer
            
        Error Undefined function in Erlang
This on compiling gives {ok,assignment5}.
 three_a(F) -> fun(Y) -> lists:foldl(F,0,Y).
After writing this
F1=assignment5:three_a(fun(X,Sum) -> X+Sum end).
Gives 
** exception error: undefined function assignment5:three_a/1
Please help out!
         
    
    
        Mishal Shah
        
- 153
- 2
- 2
- 10
                    3
                    
            votes
                
                2 answers
            
        WordPress wp-cli generates error: "Call to undefined function getallheaders"
The wp-cli tool is a very handy way to execute WordPress tasks from the command line.  However if the WordPress Site contains plugins or theme initialization code that calls the PHP getallheaders method then wp-cli will not work.  It will instead…
         
    
    
        jambroseclarke
        
- 261
- 3
- 5
                    3
                    
            votes
                
                2 answers
            
        Cloud9 cURL not working
I was just fiddling with php on cloud9 the other day and I can upon this problem that cURL did not seem to be working. When you make a php workspace in cloud9, there is autocomplete for cURL so they must know about it. Here is the…
         
    
    
        Holger Kibur
        
- 47
- 1
- 6