5 MIN READ

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

Don’t have time? Read it later:

Download the guide

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

  1. Open the XAMPP control panel
  2. Open php.ini
  3. Go to the Dynamic extensions section and remove the semicolon ";" for extension=php_soap.dll
  4. Save and Start the Apache Server

Xampp control panel screen

Starting Apache Server from Xampp

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

Create empty folder inside 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

Place code inside Xampp htdocs new

Below is a sample PHP code for adding a customer:

Sample PHP Code for adding a customer in NetSuite

Step 9

Open the browser and enter the following path:

localhost/New/add_customer.php

Success screen after adding php code in NetSuite

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

PHPToolkit_2017_1.zip / PHPToolkit_2019_1.zip
https://www.netsuite.com/portal/developers/resources/suitetalk-sample-applications.shtml

Click below to pick up a copy of the guide:

Download the guide