Linux accessing SQL Server 2008 R2? - php

I'm stuck on a real challenge here in my company. I've been programming for the last two months a ticket system based on openSUSE, Apache, PHP, MySQL and CodeIgniter for the framework.
Everything went fine since my company bought the impressive Microsoft Dynamics CRM 2011. I know that Dynamics has a great ticket system inside too, but we're really late with our deadline and I think that learning to customize the Dynamics Ticket System will be difficult.
Now I need to access the Accounts, Contacts and Employees from Dynamics (SQL Server) and use them on my PHP and MySQL system for opening and delegating tickets.
Is there any way to make this possible? I need just a connection for retrieving these three data tables from SQL Server to accomplish my task on this system.

In the MSCRM database, you'll find a view for each of those entities. If you are just trying to read data from CRM, that should work fine. If you need to push data back, you'll need to call the CRM web services. Updating the CRM database directly is not recommended or supported because you'll bypass all the application logic (plugins, workflows, security, etc).

Sure! PHP has support for SQL Server. From Microsoft SQL Server (PHP Manual):
To use the MSSQL extension on Unix/Linux, you first need to build and
install the FreeTDS library. Source code and installation instructions
are available at the FreeTDS home page: ยป http://www.freetds.org/
Make sure you abstract it away nicely!

Another possibility is to write a web service that talks to MSCRM then your PHP/Linux consumes it.

Yeah! I found it!
Basically I turned on the dynamic port on SQL Server and 1433 on TCP port on IPALL
And then on SELinux,
- setsebool -P httpd_can_network_connect = 1
- setsebool -P httpd_can_network_connect_db = 1
Geezus! I lost all my hair on that.

Related

PHP application using Windows Authentication to a MSSQL server

This is not a new topic, but the information I find is always covering only a bit or not exactly what I would need. Here's the "issue"
I'm building a web application, on a Debian / Apache / PHP host.
The web server is NOT in our Active Directory, nor will it be.
Now the web application would need to query Microsoft SQL servers to gather the information to display and so on.
Now, I've installed the Microsoft SQL drivers (version 17) and try to connect. This gives errors because we only allow windows authentication and not directly SQL authentication.
This is where the problem starts. I cannot find any proper documentation on how to get this working. It seems that if you connect without UID and PWD, it tries to logon with the UID owner of the process. This is in this case the APACHE user...which is an account on the Linux server, not known in the Active Directory /Domain. I can't have the Apache server run as a windows account, since that will impact other domains and applications running on that web server. Meaning I'm stuck....
So the questions are basically:
Is there really no proper solution to implement Windows Authentication to MSSQL with PHP (so without work arounds and so on?
Is there any site where this is explained in detail or any developed module for PHP, maybe with javascript or anything.
I can't believe this is not possible, but can't find any working solutions...
Thanks in advance everyone for taking the time to read and reply!

how to host existing mysql+php web application on ibm bluemix

i'm new to web development. I've coded a sample application using MySQL and php in xampp. now the application is perfectly running on localhost.but i need to host that with free of cost.i tried GitHub pages.but i've got to know that GitHub don't support php+MySQL applications.even i want to try microsoft azure but it's saying you'r school email id is not registered.so i thought to try ibm bluemix. but i don't know how to host php,mysql applications on ibm bluemix.present i don't have anything except code on my computer.please,help me in this issue as soon as possible.i have only single day left to complete the task.
thanks a lot in advance.
Basically you can use this as runtime - https://cloud.ibm.com/catalog/starters/php - mind the pricing plan.
You then need to look for PHP Buildpacks (internet search) which include MySQL, and apply it via the CloudFoundry command line (check IBM Cloud documentation or this
https://docs.cloudfoundry.org/buildpacks/php/index.html).
Hope this helps for the next steps.
There is also a MySQL service, however, it doesn't come for free. However, I think the expected cost is low and I think you currently gain some free money to start with when registering for the first time.
https://console.bluemix.net/catalog/services/compose-for-mysql

PHP project: Telnet connection to Nokia Equipements(MSS) with PHP and data interaction with database throught telnet

As part of my graduation project, I have to make a web application that connects to a Nokia proprietary equipment.
This is the architecture of my project.
Is it possible to do this project with to language PHP: Can I connect to the equipment with php throught telnet
and for the hand "1" Can the database through php interact with the equipment with telnet
Just to know I had never developed any thing in php, even with developing web applications.
Thank you in advance
There is a PHP telnet library available you can use that.Refer the link below http://www.geckotribe.com/php-telnet/
The short answer is no, You cannot have a Web application in PHP connection to telnet. The reason being the server that runs in front (Apache/nginx) calls the PHP script every time there is a request and has a default timeout period. So the telnet connection would be blocking for your webpage.
Now from what i understand is that you are trying to build a PHP application and you want some telnet connection to render/store in database. The correct way from my point of view to do this would be to make two applications, One is your PHP website and the other can be a wrapper around telnet server. The telnet application would run as a service unlike Php app because u need to maintain the connection. As far as the fetching the telnet data into php app/ dbs there could be many method. I am listing some of them for you.
Process pipes in php to interact with telnet app
Make a wrapper web service around telnet and use curl in php to fetch info
[Recommended if you want it in dbs] Directly add content from the telnet app into the database.
The above answer is if you only want to use PHP to make the app. If thats not the case have a look at GNU microhttpd server, That can be used to do what you are trying with much more control

How to connect VB.NET to Web Host

Basically, I want to create an application like this:YOUTUBE
I want to create an application that when I add some information from my web host (either PHP or MYSQL) VB.NET will read it.
From your website you'll need to insert the data into your MySQL database.
The problem with using the database provided by your web host is that the chances are, due to 'Security Reasons' the will have disabled external access.
This means that any files outside of your web server (your sites root/sub directory) will not be able to access the data. So, while your website will be able to connect without a problem, your program will not.
Some hosts give its customers the opportunity to add an IP address to a white list which enables them to bypass their security system. However, most will not give you this option.
My suggestion is that you either rent a VPS where you can run both the WebServer and Your MySQL database (and PHPMyAdmin) from or Set Up A MySQL database on your PC (its not that difficult just read the manual and youll be fine). If you had a VPS then you would no longer need your pre hosted webserver as you could run your own. You would need to point your domain name to your VPS webserver. It will act just like any other.
By running your own MySQL Databse you are given the option to enable remote access. This means that any external entity with the correct details will be able to connect.
If you cant get a VPS or don't want to run your own server or rent a server that allows for external access. Check out db4free.net .They provide you with a free MySQL Database with external access for Developers to test out their systems. They are not ultra fast so that's something you may want to be aware of. Another thing is that your data that's held can be removed at any time. The servers are not there to be used permanently just for testing.
So how do I connect to it through VB???
Good Question! To establish a connection, I suggest you use MySQL.Data library provided my DevMySQL themselves and import it into your program. Done so by Imports MySQL.Data.MySQLClient. This is written by them to work with their databases. Yes you can connect using some of the functions already in VB but in my opinion they don't work as efficiently. You'll need to download the MySQLConnector to connect as well.
Hopefully That Answers Your Questions. Any Problems Just Comment below!
Regards
Joe

Is there a way to access MySQL and/or PHP pages from Lotus Notes?

I have a full internet application served on a LAMP server, which I have complete access (root) to all of the server settings and web page files. Unfortunately, due to policy, it cannot be accessed outside of the company location.
However, we are using Lotus Notes for an email/database system, which is fully accessible from anywhere with an internet connection. All users have the Notes client installed, and the interaction can be one way (MySQL --> Domino Server). There are no concerns about access or security through Lotus Notes from management.
Is there a way to have notes access my LAMP server, and either serve up webpages and files, or develop a quick interface to access the MySQL database?
I am assuming that the Domino Server can access MySQL through ODBC, but I'm not sure where to go from here.
Thank you in advance for any assistance or direction!
Since you have old Notes clients, IBM's latest XPages technology is out of the question -- unless your Domino server is already open for HTTP, in which case you can use XPages on Domino to get information from MySQL and serve it to a browser. This would be the most up-to-date technical direction to go in.
But in general, the answer is yes, there are several ways for Domino servers to access MySQL data, and if you don't need to be using all the latest toys there are some old standby tools to get the job done. There is an IBM solution called Domino Enterprise Connection Services, or DECS, that performs real-time mapping between Notes databases and relational databases. You can find information about it here. Another IBM solution called Lotus Enterprise Integrator, or LEI, is designed for batch transfer operations between Notes databases and relational databases. You can find information about it here. You can also use the #DbLookup function in Lotus formula language or LCLSX (LotusScript Connector Extensions) in LotusScript code for events or agents in a Notes database.

Categories