Learn how to connect PHP Code with NetSuite using the XAMPP tool. (10 steps with images).
Steps to Connect PHP Code with NetSuite using XAMPP
This blog will walk through the steps to integrate NetSuite with PHP code using the XAMPP tool.
What is XAMPP?
XAMPP is an open-source, cross-platform, web server solution stack developed by Apache Friends. It is comprised of Apache HTTP Server, MariaDB database, and interpreters for scripts written in PHP and Perl.
Fun fact: The word 'XAMPP' (unofficially) stands for:
X — Referring to cross-platform
A — Apache
M — MariaDB
P — PHP
P — PERL
First, you will need to download and install the latest version of the XAMPP tool for PHP.
You can download the tool for free here: https://www.apachefriends.org/download.html
After installation, you need to configure the php.ini file
- Open the XAMPP control panel
- Open php.ini
- Go to the Dynamic extensions section and remove the semicolon ";" for extension=php_soap.dll
- Save and Start the Apache Server
Download PHP Toolkit: PHPToolkit_2017_1.zip
NOTE: Since this blog was originally written, PHPToolkit_2019_1 is now available to download: http://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml
Next, you need to extract the .zip file
Place the extracted PHPToolkit folder in the following location:
C > XAMPP > htdocs > (create any folder) New.
Create an empty folder (nslog) and place it inside the PHPtoolkit folder
Edit NSconfig.php by giving the credentials.
Now, place the code file in the following location:
C > XAMPP > htdocs > New
Below is a sample PHP code for adding a customer:
Open the browser and enter the following path:
If you see any errors, navigate to the nslog folder, open the .xml file, check for errors and resolve it.
Links mentioned in this blog post: