PHP has encountered an access violation at (random memory location) - php

I am using Window Server 2003 machine , and PHP 5.2.9 and it is configured to use SQL Server 2005 as Backend by making use of Microsoft SQL Server Driver.
But while executing bulk queries i some times get error "PHP has encountered an access violation at (random memory location)" after showing this error server just stops giving any response.
After restarting IIS evreything again works fine..
What could be the problem?

This could be some PHP bug, try updating the PHP version.

Related

Intermittent/random `Can't connect to MySQL server on 'XXX.XXX.XXX.XXX' (60)`?

A little background: I had to upgrade a service from PHP 5.6 to PHP 7.4. Database module was using old mysql_* functions, so the the first step was to replace them by mysqli_* and look for possible bugs, at the end it worked fine on local development environment.
As there weren't any visible bugs while testing phase, it was released to a test server. Then it started randomly an intermittently to log the following warning:
(HY000/2003): Can't connect to MySQL server on 'XXX.XXX.XXX.XXX' (60)
If you check database server at that moment it replies OK, it is not down. Also there are other 3 servers online hosting the same service and they don't show the described problem meaning database server is online and running.
Also does the 60 surrounded by parentheses means something? I know it corresponds to MySQL's Global Error Message but error number 60 (EE_SSL_ERROR) wasn't added until version 8.0.13. Could it means the same in MySQL 5.6?
After some digins and tests we (team) finally discovered it was related to client library connecting to older server.

php migration from 2003 server to 2012 not connecting to SQL server

I'm moving some php sites backed by SQL from a 2003 server to a 2012R2 server. I haven't had time to update code to use a newer php version so am using 5.2.10. I have everything working except I can't get a connection to the SQL server - the latter has not changed.
The errors I'm getting are:
PHP Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server...
PHP Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in...
How can I verify that mssql_connect and mssql_select_db are working? Or do those errors mean that they are? The credentials are the same as those on the currently working server to be replaced so I'm fairly certain that's not it but if I can be assured that the php side is working, I'll invest my attentions back to SQL and/or a possible network issue (although they're on the same network behind a firewall so that shouldn't be it)
I'm stuck with what to do next.

Connection error to sql server when doing massive queries with sqlsrv

i was wondering if anyone knows why i am getting the following error.
I have an application doing massive queries to a SQL 2008 Server. The main application runs over PHP on linux , I call many php scripts simultanously to a windows server running PHP over xampp, this server queries the sql database and this is where I am getting the error.
On this windows server I hava PHP 5.4.4 with the sqlsrv extension. I have the sql server configured to handle unlimited connections. however when I send many API calls (thousands) i eventually start getting connection errors like the one below,
Unable to connect to server
I read that mssql conection can be tuned with the max_procs config, however I am using sqlsrv extension instead and I havent found any info regarding this .
Has anyone experienced this issue before.
Thanks in advanced.

PHP Unable to connect to MS SQL server

I have used default MS SQL driver to connect to a SQL server in a php application.
I'm using XAMPP 1.6.8. my php version is 5.2.6.
Application was connected successfully to the SQL server and the application was running successfully for a long time. Now suddenly the application is showing an error on mssql_connect() function with same MS SQL access information.
the error is "Unable to connect to server: xxx.xxx.xxx.xxx"
I also checked the SQL server access info with a SQL client. SQL client can connect successfully, therefore i think the access info is correct.
Can any one help me resolved this issue?
Thx
I just found my solution here. http://jimmyli.net/2009/03/php-unable-to-connect-to-mssql/ .problem was that the file ntwdblib.dll packaged with PHP5 was an old version. then i just replace with updated one from here http://jimmyli.net/wp/wp-content/uploads/2009/03/ntwdblib.zip
Thx

PostgreSQL connection problems

I have very strange problem with my application, upon occasions I get following error when connecting to postgres. This happens without any pattern, often happens when I run some extensive selenium tests.
Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request.
Postgres logs shows no abnormalities, also other applications that run on same postgres instance have no problems at all.
My Postgres is 8.2.9, running on windows 2008 server
Any hints ?
"server closed the connection unexpectedly" most of the time means the backend crashed. If that's the case there should be some lines about it in the server log.
And by the way the latest version in the 8.2 branch is 8.2.12. Upgrade, test, report.
A random guess. Do you use persistent connections?
You're only showing the client error. Since it means that something happened on the backend, you will need to look in your server logs for information about what actually happened. (The postgres logs and/or the eventlog - check both)
A typical reason for these things to happen is if you are running some antivirus software on the server. If you do, try uninstalling it (not just disabling it) and see if the problem goes away.

Categories