
stdClass has no properties, methods or parent.
#Php enable xdebug ampps mac how to#
PHP: How to define an empty object in PHP? $x = new stdClass() You also need to restart your web server and php in order to complete the installation of a specific extension. For example, for enabling mysql extension, you have to change extension = php_mysql.dll to extension = php_mysql.dll in your php.ini file. For example, If you are using PHP 5.0.3, and you have installed php in c:\php, then you have to set extension_dir = C:\php\ext in your php.ini file.Īfter downloading the files needed, you have to open php.ini and enable a line pointing to an extension in question.įor enabling extensions, you have to uncomment a line in your php.ini file. You need to change the setting of extension dir in php.ini file. How do you configure an extension on Windows? dll file which you can download from php.net. In Windows, extensions come in the form of a. But many need to be obtained separately from php.net. Many extensions are available out of the box in the PHP installer downloadedįrom php.net or in the. for using mysql you need mysql extension of PHP). Run this file on your web server and if you get an output like this:Ī PHP extension is a piece of code which is not part of the core PHP and you need it to explore certain functionalities msi Windows installer file and follow the installation wizard.Ĭreate a php file containing code and save it as test.php.
#Php enable xdebug ampps mac install#
Install PHP on Windows using Windows installer Then Click on New under system variable and add PHPRC against Variable name and D:\php against Variable value. In the Variable value, go to the end of the list and put a semicolon, then add D:\php D:\php\ext assuming D:\php is the location of your php installation. Now you open Environment Variables (M圜omputer -> System Properties -> Environment Variables), under system variables, select Path and click Edit, if you have installed php in php folder of D drive, setting will be extension_dir=D:\php. Open the file php.ini with any text editor and find extension_dir within the file.Ĭhange the extension directory, i.e. c:\php or d:\php).Įnter php folder and rename the file php.ini-recommonded to php.ini. Įxtract the downloaded file to php folder which must be created at the root of any of your windows drives (e.g. You have to download zipped binary version of PHP from.
