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
Step 1
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
Step 2
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
Step 3
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
Step 4
Next, you need to extract the .zip file
Step 5
Place the extracted PHPToolkit folder in the following location:
C > XAMPP > htdocs > (create any folder) New.
Step 6
Create an empty folder (nslog) and place it inside the PHPtoolkit folder
Step 7
Edit NSconfig.php by giving the credentials.
Step 8
Now, place the code file in the following location:
C > XAMPP > htdocs > New
Below is a sample PHP code for adding a customer:
Step 9
Open the browser and enter the following path:
localhost/New/add_customer.php
Step 10
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:
XAMPP tool
https://www.apachefriends.org/download.html
https://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml