How can I access a Lotus Notes Database from PHP5 - php

I would like to access our Domino Databases from php.
My php5 is running in an Linux environment OpenSuse and for development Debian based System. Domino Server 8.5.1 is also running on a OpenSuse Server.
Currently I'am accessing the Databases via parsing the web pages from Notes, but that is a horrible way to do that.
Are there any ways or ideas to access Notes an more comfortable way?

Yes, there are plenty of ways. You can use Domino Designer to write a web service on the Domino server to expose the data that you want, and access the service that from your PHP code. You can use REST APIs if your Domino server can be upgraded to 8.5.3 or higher. You might be able to install Domino on your OpenSuse server and have your PHP code invoke Java programs that use the Notes classes in Notes.jar to do the work, or you can actually do that without installing Domino, but you'll have to use the remote version of the classes in NCSO.jar and your server will have to enable CORBA. You can use ODBC and NotesSQL as discussed here. I'm listing that last even though you did put an ODBC tag on your question because Notes databases are not relational and I find thinking of them that way to be too limiting, but if your data fits a relational model and you're comfortable with it, then it might be your best choice.

What Richard said, except I would start with this link for REST APIs. That takes you to the latest product documentation. Richard's link takes you to a slightly outdated page on OpenNTF.

Related

How to configure PHP on http-server

I'm doing a project that involves using a server to host files on the web. I'm very new to web hosting technologies and I found an angular tutorial that used a very simple server called http-server and with this tutorial I was able to get a site hosted to localhost. Getting something hosted using the tutorial required to know very little about how each individual step was working. I want to use PHP but also being new to that, I know that it's server side and I need the server to have PHP installed but I have no idea how or if it's possible given this tool.
I'm not sure if have to move to a larger scale web server with php installed by default like Apache, but I'd prefer to keep it simpler if possible. Here's a link to the tutorial and server utility if that helps at all
https://docs.angularjs.org/tutorial/step_00
https://github.com/indexzero/http-server
If you really want to publish anything "on the web", there's really no need to create a webserver on your own. Any provider you choose will have everything you need preinstalled for very little money, usually in the form of a LAMP stack. (Linux/Apache/Mysql/PHP). The DIY webserver you tested is a security risk at best if you're online with it. And simple as it may seem, the AngularJS server is surely more trouble than just using a pre-installed LAMP, especially when you think about maintenance. If you do not plan to use a commercial webhosting provider, tell us what your platform is, and somebody will be able to point you in the right deirection with a LAMP or WAMP install. It's not that difficult, really.

How to run php with sql server?

I am creating an android application that uses PHP and SQL Server 2008. I have successfully connected these with the help of Wampserver on my machine and Sql Server on remote location.
The problem is now I don’t know where to run PHP webservice so that I can access PHP webservice remotely at all times through my android application.
I tried using the hosting site www.bytehost32.com but it didn’t work.
I also tried to install PHP on IIS and run on same server as the database but could not find an appropriate solution that suits my requirement.
I think 000webhost.com id quite easy to setup and reliable (and free). (If you're interested .tk domain registration is free).
It depends on which version of PHP you're using, but if you're using PHP5+ you can use Microsoft's SQL Server Driver for PHP.
Use this link :http://sqlsrvphp.codeplex.com/
Make sure you use version 2, which gives you the PDO functionality as well as the procedural style.

How to bundle a php application with 1 click run/install

I create php application for small businesses. Some of the clients may prefer running the app on a local server, therefore my requirement is to create/bundle an app with apache/mysql/php with all the necessary confirguration and one click executable (be it a batch file) such that when the user opens it, it runs the apache server on some port say localhost:1234 and mysql as well.
and opens up the application in the default web browser.
To be more exact, Im looking for something like http://www.simpleinvoices.org/go, check their Simple Invoices for Windows which come budled with apache/php/mysql.
P.S - Im not sure if this question should be at SO or Superuser.
If you actually want to install a web server and a SQL server then Lars' solution would be a way to go. On windows you can generate a .msi installer containing the dependencies you need (like WAMP). An installer executable would be a cleaner solution than a batch file in my opinion, as it will also provide the user with an option to uninstall your software if they wish.
If you want to distribute your application in a standalone version, then you might also want to check a solution like NuSphere's PHPDock - http://www.nusphere.com/products/phpdock.htm
I had the same challenge and came across Uniform Server:
http://www.uniformserver.com/
You download it, add your application to it, start it and everything runs. Lovely.
Superuser would have been better. But depending on your requirements, you should just create a package to install. On windows, package it with WAMP, on linux, package it with either one-click-install or creating packages for the two biggest systems, namely APT and RPM. With the dependency-system on all of them you can make sure, that your application runs right off the bat.
PHP Desktop is the best option I found when researching this.
https://github.com/cztomczak/phpdesktop
PHP Nightrain is also an option:
https://download.cnet.com/PHP-Nightrain/3000-10248_4-76169308.html
Bitnami WAMP stack looks good as well:
https://docs.bitnami.com/installer/infrastructure/wamp/

how to start php?

I am asp.net developer , i want to learn php
what are the software need to run compile php file ?
how to install this software any path that should be set ?
what kind of database it needs to store data and retrieve date ?
see me as beginner and then give the idea / information ..........
thanxx
You just need the PHP interpreter and if you want to do web stuff a webserver.
You can get the interpreter from http://www.php.net - if you are using windows you really want to get a binary version and not compile it on your own - and the Apache webserver.
As a database PHP developers usually use MySQL (but it can also connect to most other databases).
The easiest way for your to get started is getting a package like XAMPP which will contain all you need without requiring you to configure everything manually.
For actually learning PHP, please get a recent book/tutorial. Old stuff is usually telling people to do horribly things every sane developer will hate you for (cluttering your global namespace with variables settable by the user for example).
You could have a look at the official PHP docs which also contains a "getting started" guide.
Since you are an ASP.NET developer I assume that you are familiar with IIS and that you're probably using IIS 7.5. If so then the easiest way to familiarize yourself with PHP is to use Microsoft Web Platform Installer and install PHP directly to IIS. You don't have to set any paths after that, just create a site on IIS and start putting PHP files there. Keep in mind that Web Platform Installer automatically enables WinCache extension and your changes might not be there when you hit the refresh button. Just locate the php.ini and comment out the relevant line.
Straight from the horses mouth. Getting Started. You will need a php interpreter, if you have access to a webhost that has php installed you're half way there, if you have a linux partition you're half way there, otherwise check out XAMPP.
Software: XAMPP will get you up and running
Tutorial: w3schools
If you are familiar with IIS and want to use it as your web server you can download PHP for IIS here and use some of the learning material there to get started.
If you did not want to use IIS and wanted to use Apache instead then I agree with the others XAMPP will get you a dev environment up and running quickly.

start php, apache?

I've just started reading about php, it needs me to install php, apache and MySql to run any php script. can any one suggest me a simplest method to install php, apache and MySql so that i can sun those php script.
I've tried the zip files from php.net, Are those required to run the script offline for practicing the script? what do i do with them? i felt the things given on the same site a bit complex, and was unable to run the script. please help.
I'm assuming you're using Windows - get wamp - it has exactly what you need:
Apache
MySQL
PHP
Wamp comes with a nifty tray controller app which you can use to access the most common tasks, like restarting services, editing config, etc.
Equivalent to Artem's post, just a different organization which packages it differently. And my preference. It is called XAMPP.
If you are using Windows, you could install XAMPP to have the environment setup for you. You'll then need to learn how to bring up the server (basically executing the XAMPP control panel program), copy your PHP scripts into the correct directories (for XAMPP, it'd be C:/[xampp installation dir]/htdocs), access MySQL and creating the necessary MySQL databases (you could access the MySQL via the included PhpMyAdmin).
You can probably refer to a tutorial here (it's a YouTube video, BTW).
Don't have enough rep to comment but wanted to add something to Artem's recommendation of Wampserver. It's what I use on my windows machine, and one of the nicest things about it I find is the ability to have multiple versions of versions of apache, php and mysql installed alongside each other as plug-ins and then select which to have running at any time. It makes it easy for me to emulate the eventual hosting environment for any given project.

Categories