WAMP and SQLSRV: sqlsrv not included in `PDO::getAvailableDrivers()` after install - pdo

I've never been able to get SQL Server to play nicely in my WAMP environment, and I trying to finally solve it once and for all.
Tried:
Downloaded the latest SQL Server drivers from microsoft, then extracted and dropped them in my \wamp\bin\php\php5.4.3\ext dir.
I edited both the \wamp\bin\php\php5.4.3\php.ini and \wamp\bin\apache\apache2.4.2\bin\php.ini files to include extension=php_sqlsrv_54_ts.dll.
restarted all WAMP services
checked phpinfo ... no SQLSRV
checked PDO::getAvailableDrivers() ... got only Array( [0]=>mysql, [1]=>sqlite )
Now, I understand that PDO is included natively in PHP 5.3+, but since the MS instructions explicitly requires that extension=php_pdo.dll be enabled, so I figured I'd give that a shot too.
I downloaded the DLL from dlldll.com (1st encounter with that site, so I hoping it's a reputable source), extracted and moved the _php_pdo.dll_ file to my \wamp\bin\php\php5.4.3\ext dir, then added it into both the php.ini files ... no improvement.
As a side note, when I check the list of activated PHP ext's from the WAMPSERVER menu, the sqlserver extensions don't even show up on the list.
Just to test it out, I also tried uncommenting extension=php_pdo_pgsql.dll in the php.ini's, and that worked just fine ... "pgsql" was included in the avail drivers array.
My setup:
Wampserver 2.2 (64bit), running
Apache 2.4.2
PHP 5.4.3
Win 7 pro 64
What next?
I'm just about out of ideas.
The only thing I can think of is that maybe the SQLSRV drivers are 32bit, and not playing nicely with my 64bit setup ... ooohhh goodness .. I sure hope not.
Any tips/pointers are welcome ... especially if they don't include completely reinstalling ;)

I was able to get the sqlsvr PHP PDO driver working on my slightly older version of WAMP 32-bit. Here is my setup:
WAMP 2.2 (32 bit)
Apache 2.2.21
PHP 5.3.8
Win 7 Pro 64 bit
Here is what I did:
Downloaded the MS 3.0 drivers from here: http://www.microsoft.com/en-us/download/details.aspx?id=20098
Unpacked all of the files into the PHP ext folder (C:\wamp\bin\php\php5.3.8\ext)
Added this line to my apache php.ini file (C:\wamp\bin\apache\Apache2.2.21\bin\php.ini)
extension=php_pdo_sqlsrv_53_ts.dll
Downloaded and installed MS SQL Server 2012 Native Client ODBC driver from here: http://go.microsoft.com/fwlink/?LinkID=239648&clcid=0x409
After these steps my PHP code happily connected to my SQL Server database.

Related

Run ColdFusion 9.02 on Apache 2.4 x64

I've inherited an application server which I need to maintain/upgrade.
It's currently running Windows Server 2008R2, ColdFusion 9.02 32-bit and Apache 2.4 32-bit.
Because I want to upgrade/debug/alter the CF source code, I want to use FusionReactor to help me, especially the (line)debugging part.
Unfortunately, FusionReactor only runs (well, the debugging part) on 64bit java. Because the CF application is quite old, it's not ready to run on a newer CF version yet (and I want to port it to Lucee eventually). So, that leaves me the option of CF 9.02 64bit. Problem there is, that it won't run out of the box on Apache 2.4 (only 2.2).
CF 9.02 32bit is currently running on Apache 2.4 because I compiled/patched an Apache 2.2 module (mod_jrun22.so) so it works on Apache 2.4 (with the help of this https://g0blin.co.uk/mod_jrun-on-apache-2-4-ubuntu-14-04-coldfusion-9/ )
Unfortunately, I'm unable to do the same for Apache 2.4 64bit, because there seems to be no apxs 64bit available.
I could downgrade Apache 2.4 -> 2.2, but that's only my last resort.
Now my question. Is somebody able to recompile this module for 64bit, or give me some guidelines to do so? Is apxs available for 64bit? If not, Is there a simple way to compile (custom) modules for Apache 2.4 64bit?
Thanks!
http://www.gpickin.com/index.cfm/blog/multi-cfml-engine-install-extracting-the-coldfusion-9-connector-for-apache
Run it by ./apache_connectors.sh
If you get a GCC not found error, you might have to install some development tools,
to allow you to build the connector.
yum groupinstall 'Development Tools'
You might reach out to Gavin, the author of that article to see if he has any further notes. It's been forever and a day since I had to deal w/ 32-bit CF. I know I managed to get CF 8 to run on 64-bit, which was never officially supported IIRC, but I don't have any of those notes anymore.
You might look to using CommandBox to run your server instead of Apache. It might make your conversion to Lucee easier too. The only reason to convert the engine depends on how much new code is being written for this application. You can get away with CF 9 without the effort of upgrading or converting.

httpd.exe-The application was unable to start correctly (0xc0000005). Fix?

First of all, im running a Windows 64bit OS. I was having WAMPServer 2 and all of the modules were running good. I knew about WAMPServer 3 and decided to upgrade to it. As of its documentation, we should uninstall the old version , requires all updated Visual C++ Redistributable Packages and i did it as it said.
Checked WAMPServer 3 requirements and also checked with their check_vcredist tool and the result was good. I installed WAMPServer 3, all other modules were working but Apache is not opening and throwing a error message-"The Application was unable to start correctly(0xc0000005)". Apache worked properly in WAMPServer 2.
If anyone's got a solution, please respond to the topic!
Try using System Restore to restore your computer to an earlier successful time

XAMPP Can't Start Apache After Upgrading to PHP7.1.17 "Attempting to start Apache service..."

I have XAMPP installed on Windows 7 virtual machine. My old PHP version was 7.0.9 with Apache 2.4
I needed to upgrade the PHP version to 7.1.x and I set out reading about how to best to this. In end, I settled with the simple plan:
Stop Apache service
Downloaded new PHP version from official php website. For PHP 7 the 7.1.17 version was listed. I downloaded the thread safe version, as my Apache has thread safety enabled.
I extracted the contents of the downloaded archive to a folder.
I copied and replaced all files in the appropriate folders from C:/Server/php with the new php version files from the extracted archive.
I attempted to start Apache from the XAMPP control panel and the server will not start.
The message "Attempting to start Apache service..." just hangs and nothing happens.
The last entry in the error.log file in C:\Server\apache\logs shows the event when the server was stopped and that's it.
When I check the php version from CLI with the command php -v, the console returns installed php version 7.1.17
I tried different suggestions I read from similar questions, like changing ServerName localhost:80 to ServerName localhost:8080 and copying php7apache2.dll to apache/bin ( as suggested here: Upgrading PHP in XAMPP for Windows? ), alas the issue is not fixed and Apache does not start.
Of course, I also restarted the virtual machine, all the same.
At this point, I'm dumbfounded. Don't know what to do.
I need to get Apache running with php 7.1, as it is required by Magento 2.2.4. I do not want to reinstall XAMPP, as this will be a lenghty process with a lot of risk for more things to go wrong.
Any help is much appreciated!
Alright, so after checking Windows Logs > Application in Event Viewer I saw the error ".. the Apache service named is not a valid win32 application". I downloaded the x86 version of PHP from official website PHP for Windows
Then copied and replaced files as described above, and Apache started successfully.
To see if your Apache version is x64 or x86 open command prompt and cd to your Apache bin directory, in my case C:/Server/apache/bin , then run:
file httpd

How to upgrade Apache on a Windows server?

I have just upgraded our webserver from PHP 5.3.6 to 5.3.10, and I now want to upgrade Apache as well from 2.2.17 to 2.2.22 (on a Windows Server). How do I go about this in a good way (on a live webserver)? A little downtime is alright, but not too much.
Apache is installed via an MSI installer and I'm not sure how to upgrade safely with the least downtime.
Do I just download the latest installer and install that? And what about my config files? I don't think it's possible to have both instances installed 'next to each other'? Or is it?
For anyone else who searches for this, I found that uninstalling the old Apache (in my case, 2.2.22) from Add/Remove Programs and installing the new version (in my case, 2.2.24) kept all the previous settings.
We had locked down the httpd.conf file and had an application that modified/added files in the "htdocs" directory.
Upon uninstalling and re-installing, all of these files were left unchanged and the new version of Apache Server is reflected.
Download a latest version of apache installer.
Make the necessary config changes.
Run it on a different port, other than your live server.
If things work well, correct the port number, and replace.
It will really take a little down-time.
I did it today on windows server 2012R2, apache was installed from "source" (installer was not used-updated to 2.4.55):
1.Stop apache service
2.Rename apache directory (from C:\Apache24 to C:\Apache24-old)
3.Extract Apache24 folder from zip archive downloaded from apache web site to original location (C:\)
4.Copy conf folder from previous installation to the extracted folder (Copy C:\Apache24-old\conf to C:\Apache24\conf-overwrite)
5.(Optional), if you have any certs copy it from C:\Apache24-old\ to C:\Apache24
6.Start apache service,no issues faced

Does Mono XSP Server Work?

I'm trying for a week to make my XSP server work with simple static content: html-pages, js-files, gifs, jpegs etc... No ASP.NET. And this server always randomly crashes while navigating this pages with browser.
My Environment is: Mono 2.6.1, Windows Vista. I also tried to build XSP on linux (with Novell's make-files) but same result.
So, could XSP be used anyhow? Is there anybody who made XSP work fine without crashes? If yes, please tell me how. If no, is there another open-source ASP.NET http-server?
Try xsp2 not xsp, as it is newer. Also Tomi is right and you should be using mod-mono for production, however, that is not going to work on Windows right now (at least the last thing I read was that mod_mono was not yet working with Apache on Windows). XSP2 definately works on Linux, and although I haven't tried it on Windows, but if there are problems with it you should probably file a bug report with the Mono team. Xsp definately does not work with some of the code I have written, so I think it is only used for Net 1.1 era asp, not asp2.0.
You can use for example Apache with mod_mono or Nginx on Linux. I wouldn't recommend using XSP for production use since it's used mostly as development web server in conjuction with MonoDevelop.