Verification: a143cc29221c9be0

Php call to undefined function now

Shared Hosting

If you are on shared hosting and do not have command line access to your web server or access to php.ini, you may have to contact your web host to see if they support the cURL PHP extension. Many web hosts disable this extension by default for security reasons but may enable it manually for you on request.

Install cURL extension for Apache/Nginx on Linux

If you have shell access to your Apache or Nginx web server, make sure the cURL extension is installed:

sudo apt-get install php-curl

You must also restart your web server for changes to take effect.

To restart Apache, run:

sudo service apache2 restart

To restart Nginx, run:

sudo service nginx restart

Now test cURL with:

curl google.com

If you see some HTML, cURL is working correctly.

Check php.ini

If cURL is installed but you are still getting “Call to undefined function curl_init()”, you may need to enable the extension in your php.ini file.

Firstly, locate your php.ini file: Where is my PHP php.ini Configuration File Located?

In the example below, we are editing the php.ini file for Apache with PHP 7.2.

sudo nano /etc/php/7.2/apache2/php.ini

Press CTRL + W and search for curl.

Remove the ; semicolon from the beginning of the following line. This line may look different depending on your version of PHP, just remove the semicolon.

php.ini

;extension=curl

To save file and exit, press CTRL + X, press Y and then press ENTER.

You must restart your web server for changes to take effect.

To restart Apache, run:

sudo service apache2 restart

To restart Nginx, run:

sudo service nginx restart

Now test cURL with:

curl google.com

If you see some HTML, cURL is working correctly.

Topic

Call To Undefined Method __php_incomplete_class::__set_state()

View Content

So i read the docs on this and it said to create a callback function and use ini_set to set the function. I am trying to serialize an array with the class inside the array

Code: [Select]
$dd_normal_button = array (
        'dd_normal_button_display' =>
        array (
                'dd_button_digg' =>
                __PHP_Incomplete_Class::__set_state(array(
                '__PHP_Incomplete_Class_Name' => 'DD_Digg',
                'buttonLayout' =>
                array (
                        'Wide' => 'DiggWide',
                        'Normal' => 'DiggMedium',
                        'Compact' => 'DiggCompact',
                        'Icon' => 'DiggIcon',
                ),
               )
              )
             )
            );

So then I try

Code: [Select]
serialize($dd_normal_button);
and I get the error.

Any ideas/suggestions.

Thanks