SWIG is a tool that connects C/C++ code to scripting languages like PHP. It works by taking C/C++ declarations and generating wrapper code. To use SWIG with PHP: 1) Write a SWIG interface file; 2) Run SWIG to generate wrapper code; 3) Compile the wrapper code into a PHP extension. The extension can then be loaded in PHP to access functions defined in the C/C++ code.
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
This is the presentation given at the Symfony Live 2011 conference. It is an introduction to the new agile movement spreading in the technical operations community called DevOps and how to adopt it on web development projects, in particular Symfony projects.
Plan of the slides :
- Configuration Management
- Development VM
- Scripted deployment
- Continuous deployment
Tools presented in the slides:
- Puppet
- Vagrant
- Fabric
- Jenkins / Hudson
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
This is the presentation given at the Symfony Live 2011 conference. It is an introduction to the new agile movement spreading in the technical operations community called DevOps and how to adopt it on web development projects, in particular Symfony projects.
Plan of the slides :
- Configuration Management
- Development VM
- Scripted deployment
- Continuous deployment
Tools presented in the slides:
- Puppet
- Vagrant
- Fabric
- Jenkins / Hudson
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsAndrey Karpov
Static code analysis is most effective when changing a project, as errors are always more difficult to fix in the future than at an early stage. We continue expanding the options for using PVS-Studio in continuous development systems. This time, we'll show you how to configure pull request analysis using self-hosted agents in Microsoft Azure DevOps, using the example of the Minetest game.
Drupal Continuous Integration with Jenkins - DeployJohn Smith
Simple deployment setup for Jenkins. This tutorial assumes you have used our previously released "Drupal Continuous Integration with Jenkins" tutorial to setup your Jenkins server. This document is being released under the Creative Commons CC0 license.
Enjoy!
Microsoft R server for distributed computing โดย กฤษฏิ์ คำตื้อ Technical Evangelist Microsoft (Thailand) Limited ในงาน THE FIRST NIDA BUSINESS ANALYTICS AND DATA SCIENCES CONTEST/CONFERENCE จัดโดย คณะสถิติประยุกต์และ DATA SCIENCES THAILAND
At the moment, cloud CI systems are a highly-demanded service. In this article, we'll tell you how to integrate analysis of source code into a CI cloud platform with the tools that are already available in PVS-Studio. As an example we'll use the Travis CI service.
Presentation of codeigniter to understand the framework and easy to understand for beginners.Codeigniter is php framework easy to learn and useful for start into web devlopment.
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Pantheon
Greg Anderson's slide deck from BADCamp 2016.
Having a fine-tuned continuous integration environment is extremely valuable, even for small projects. Today, there is a wide variety of standalone projects and online Software-As-A-Service offerings that can super-streamline your everyday development tasks that can help you get your projects up and running like a pro. In this session, we'll look at how you can get the most out of:
- GitHub source code repository
- Packagist package manager for Composer
- Travis CI continuous integration service
- Coveralls code coverage service
- Scrutinizer static analysis service
- Box2 phar builder
- PhpDocumentor api documentation generator
- ReadTheDocs online documentation reader service
- Composer scripts and projects for running local tests and builds
Or: how to build a complete system from scratch.
It begins by the requirements to have an installation process
easy to repeat, documented and auditable.
Jump into Squeak - Integrate Squeak projects with Docker & Githubhubx
Squeak projects are hard to explore for new Smalltalk programmers. We propose a system that lowers entry barriers and provides
an experience comparable to the of web demos. Our system integrates
into Github and provides Git support for Squeak
This article is about using Serverless platform OpenWhisk. The example shows how to do auto retweeting in Python to illustrate an application of serverless approach. Originally published in October 2017 edition of Open Source For You magazine - shared under CC BY SA-3.0 License.
PVS-Studio: analyzing pull requests in Azure DevOps using self-hosted agentsAndrey Karpov
Static code analysis is most effective when changing a project, as errors are always more difficult to fix in the future than at an early stage. We continue expanding the options for using PVS-Studio in continuous development systems. This time, we'll show you how to configure pull request analysis using self-hosted agents in Microsoft Azure DevOps, using the example of the Minetest game.
Drupal Continuous Integration with Jenkins - DeployJohn Smith
Simple deployment setup for Jenkins. This tutorial assumes you have used our previously released "Drupal Continuous Integration with Jenkins" tutorial to setup your Jenkins server. This document is being released under the Creative Commons CC0 license.
Enjoy!
Microsoft R server for distributed computing โดย กฤษฏิ์ คำตื้อ Technical Evangelist Microsoft (Thailand) Limited ในงาน THE FIRST NIDA BUSINESS ANALYTICS AND DATA SCIENCES CONTEST/CONFERENCE จัดโดย คณะสถิติประยุกต์และ DATA SCIENCES THAILAND
At the moment, cloud CI systems are a highly-demanded service. In this article, we'll tell you how to integrate analysis of source code into a CI cloud platform with the tools that are already available in PVS-Studio. As an example we'll use the Travis CI service.
Presentation of codeigniter to understand the framework and easy to understand for beginners.Codeigniter is php framework easy to learn and useful for start into web devlopment.
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Pantheon
Greg Anderson's slide deck from BADCamp 2016.
Having a fine-tuned continuous integration environment is extremely valuable, even for small projects. Today, there is a wide variety of standalone projects and online Software-As-A-Service offerings that can super-streamline your everyday development tasks that can help you get your projects up and running like a pro. In this session, we'll look at how you can get the most out of:
- GitHub source code repository
- Packagist package manager for Composer
- Travis CI continuous integration service
- Coveralls code coverage service
- Scrutinizer static analysis service
- Box2 phar builder
- PhpDocumentor api documentation generator
- ReadTheDocs online documentation reader service
- Composer scripts and projects for running local tests and builds
Or: how to build a complete system from scratch.
It begins by the requirements to have an installation process
easy to repeat, documented and auditable.
Jump into Squeak - Integrate Squeak projects with Docker & Githubhubx
Squeak projects are hard to explore for new Smalltalk programmers. We propose a system that lowers entry barriers and provides
an experience comparable to the of web demos. Our system integrates
into Github and provides Git support for Squeak
This article is about using Serverless platform OpenWhisk. The example shows how to do auto retweeting in Python to illustrate an application of serverless approach. Originally published in October 2017 edition of Open Source For You magazine - shared under CC BY SA-3.0 License.
The manual of the GTK+ 2.0 application - Desktop App Chooser which let the user to browse all installed X desktop applications and retrieve the Desktop Entry content of each application.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
2. Index
What is SWIG? ..................................................................................................................................................... 3
Install SWIG Tool & Library............................................................................................................................... 4
SWIG for PHP....................................................................................................................................................... 6
Generate and Install PHP Extension................................................................................................................... 7
Use PHP Extension.............................................................................................................................................. 18
3. What is SWIG?
SWIG, Simplified Wrapper and Interface Generator, is a software development tool for building scripting
language interfaces to C and C++ programs. It is a kind of interface definition/description language (IDL).
Originally developed in 1995, SWIG was first used by scientists in the Theoretical Physics Division at Los
Alamos National Laboratory for building user interfaces to simulation codes running on the Connection
Machine 5 supercomputer.
SWIG was originally designed to make it extremely easy for scientists and engineers to build extensible
scientific software without having to get a degree in software engineering. It simplifies the task of interfacing
different languages to C and C++ programs by largely automating the task of language integration--allowing
developers and users to focus on more important problems.
In a nutshell, SWIG is a compiler that takes C/C++ declarations and creates the wrappers needed to access
those declarations from other languages including Perl, PHP, Python, Tcl, Ruby, Guile, and Java. SWIG
normally requires no modifications to existing code and can often be used to build a usable interface in only a
few minutes.
SWIG official site:
* http://swig.org/
SWIG documentation and tutorial:
* http://swig.org/doc.html
* http://swig.org/tutorial.html
Download SWIG source archive for different operating system platforms:
* http://sourceforge.net/projects/swig/files/
Example codes for this documentation could be downloaded from the GitHub:
https://github.com/wiliwe/swig-php-example
4. Install SWIG Tool & Library
The environment used in this document:
* Linux CentOS 6.5 64-bit (could be updated to 6.6 or 6.7)
* GCC C/C++ compiler v4.9.0 (which support C++11 and C++14 standards)
* SWIG v3.0.7 (released on 2015-08-03)
(Note that in console/terminal, type “swig -version”, it will show v1.3.40)
* PHP v5.3.3
* Qt Creator v3.3.1 IDE tool
Before installing the SWIG v3.0.7, please remove the old built-in SWIG from CentOS 6.5:
$ su (change to root)
# yum erase swig
Build & Install SWIG tool and libraries
The SWIG tool/library installation guide is described in “Installation” section of chapter 1, “Preface.”
1) Donwload the SWIG v3.0.7 source archive for Unix/Linux, swig-3.0.7.tar.gz, from the site:
http://sourceforge.net/projects/swig/files/swig/swig-3.0.7/
5. 2) Unpack swig-3.0.7.tar.gz to generate a folder named “swig-3.0.7”.
3) Enter the folder “swig-3.0.7” and run below commands to build and install SWIG tool and library:
$ ./configure --prefix=/usr --libdir=/usr/lib64
$ make
$ su (change to root)
# make install
By default SWIG installs itself in “/usr/local”. The installation path could be found in the file config.log
which is under the directory “swig-3.0.7”. In config.log , search “prefix=” and “libdir=” variable
assignments and you could see the installation path.
After installing, run “swig -version” to verify the version of the SWIG is what we set.
4) It could use command “swig -swiglib” tool to find out where SWIG thinks its library is located (be sure
SWIG tool and library are installed properly before running this command).
6. SWIG for PHP
For PHP scripting language, SWIG generates PHP Extensions (or called modules) for gluing C or C++ codes.
PHP extension is as a dynamically loaded library: in MSFT Windows, it is DLL(.dll) ; in Unix/Linux, it is
SO(.so); in Apple Mac OS X, it is DYLIB(.dylib).
The location of PHP built-in modules could be found from the result of execution of PHP phpinfo() function:
In SWIG documentaiton 3.0 (http://swig.org/Doc3.0/index.html), chapter 4 explain the relationship between
scripting language (pythong, PHP, perl, etc) and C/C++ languages.
7. Generate and Install PHP Extension
Basic steps of using SWIG are as below:
1) Write a SWIG interface file describing the interface name and its parameter. The interface files usually end
with “.i” extension name which stands for “interface.”
Below snapshots are examples for SWIG interface writing. It could declare all interfaces name in the
interface file or use a header to contain it and include this header file into the interface file.
<Non Header Way>
< Header way>
2) Use SWIG tool(swig) with the written interface file as input to generate files for building out
extension/module file of target language.
Below commands are for building out PHP extensions from C and C++, you could put then into a Make file and
make it. Remember that it MUST run “swig” tool to generate C or C++ wrapping source and header files for
the generation of PHP extension file as the FIRST step.
For generating PHP extension, it needs PHP development library header, so run below commands to install it:
$ su (change to root)
# yum install php-devel.x86_64
<For C>
swig -php swigphp.i (replace “swigphp.i” with your SWIG interface file name)
gcc `php-config --includes` -fpic -c swigphp_wrap.c swigphp.c
gcc -shared swigphp_wrap.o helloswig.o -o swigphp.so
8. Running “swig” tool for C++ will generate three files:
* swigphp_wrap.c
* php_swigphp.h
* swigphp.php
<For C++>
swig -c++ -php swigphp.i (replace “swigphp.i” with your SWIG interface file name)
g++ `php-config --includes` -fpic -c swigphp_wrap.cpp swigphp.cpp
g++ -shared swigphp_wrap.o swigphp.o -o swigphp.so
Running “swig” tool for C++ will generate three files:
* swigphp_wrap.cpp
* php_swigphp.h
* swigphp.php
Below snapshots show an example of generation and compilation of a PHP extension, helloswigc.so.
Besides command line way, it could use Qt Creator IDE and QMake to build out PHP extension. The Qt
Creator project setup steps are show below. The needed C or C++ source files are needed to be generated
through “swig” tool in advance.
1) Create a whole new Qt project by clicking these items:
“Library” -> “C++ Library”
9.
10.
11. In project window, remove the Qt Creator generated files.
Add C or C++ source files generated by “swig” tool into Qt Creator project.
* php_SWIG-Module-Name.h
* SWIG-Module-Name _wrap.c (for C)
or
SWIG-Module-Name _wrap.cpp (for C++).
12. 5) In Qt PRO file, change the value of TARGET variable for output file name you want.
13. 6) In Qt PRO file, add below line for searching PHP zend.h file when building.
QMAKE_CXXFLAGS += `php-config --includes`
Also, add C++10 standard supporting flag.
QMAKE_CXXFLAGS += -std=c++0x
7) Uncheck “Projects-> Build & Run -> Shadow build“ for “Debug” and “Release”.
8) Start to build by clicking “Build” button (a hammer icon) on IDE’s side panel.
9) After building out SWIG PHP extension SO file successfully, it will generate the file "libhelloswigc.so.1.0.0"
whose version number may not be “1.0.0”, it is up to your setting.
Change extension file name from " libhelloswigc.so.1.0.0" to "helloswigc.so".
Install PHP Extension
Edit /etc/php.ini , in "Dynamic Extensions" section, add this line:
extension = helloswigc.so
Drop down to change to
Debug or Release.
14. It could add more than one lines of “extension=” for multiple PHP extension loading.
Save /etc/php.ini and use “php -m” command to verify if it could load new assigned PHP extension
successfully.
15. If a PHP extension file specified in php.ini does not exist under PHP extension folder, it will show below error
message:
Finally, restart Apache through the commands:
$ su (change to root)
# service httpd restart
Note that the PHP configuration file, php.ini, may locate in other folder. You could find it through put a PHP
page(file name ends with ".php") under /var/www/html folder and the page's contents are as below:
In Web browser, to browse this PHP page, if it could be run successfully, it will show information about PHP.
<?php
phpinfo();
?>
Note
When running “php -m” If it could not find one or more needed libraries the PHP extension
depends on, it will show error message that tell you which library could not be found.
16. Look at the entry having the string "Loaded Configuration File" , it shows the actual path to php.ini file.
Run below commands in root to put "helloswigc.so" file to PHP module folder.
$ su (change to root)
# cp ./helloswigc.so `php-config --extension-dir`
, where `php-config --extension-dir` option will output the path to PHP module folder.
Note
<1> When building C++ file, it MUST use g++ or c++ instead of gcc compiler, or it will happen error when
loading PHP extension/module that it will say it could not find name mangling/decoration symbol as
below snapshot.
17. <2> For earlier version of SWIG, if the version of PHP library for building PHP extension is not the same as
the one you will run on, it might show this error message when running “php -m” command:
“Unable to initialize module”
, see below sites for more information:
* http://php.net/manual/en/solr.installation.php
* http://stackoverflow.com/questions/2394532/apache-is-unable-to-initialize-module-because-of-modules-and-phps-api-dont
* http://stackoverflow.com/questions/3130910/php-warning-php-startup-unable-to-initialize-module
18. Use PHP Extension
Write a PHP file including “swig” tool generated PHP file and call the interface specified in SWIG interface file.
Below snapshot shows an example that helloswigc_test.php includes helloswigc.php which was generated by
“swig” tool.
In Web browser, locate to helloswigc_test.php, if anything is okay, it could show the result what you want.
It could use “php” tool to run PHP page. For example:
$ php -c . /var/www/html/ helloswigc_test.php
Note
If one or more PHP extensions contain more than one identical class names or macro without using namespace
to isolate it, it will cause fatal errors and let Apache Web server crash, it will not boot successfully until the class
name confilict issue is remove.