I run simpleSamlPHP 1.9 on a PHP 5.3.9 installation in EasyPHP, on a Windows XP machine. SimpleSamlPHP is serving as a SAML identity provider, fetching users in a local MySQL database.
My problem is that when requesting authentication against this IdP, Apache crashes throwing a "violation access" error, a.k.a. segfault. The problem is similar to this thread except that the child process exits with status 0 (but isn't this a Windows-specific feature of PHP regarding exit codes ?).
The common fix, copying libmysql.dll and php5apache2.dll in C:\Windows\system32, doesn't help.
Running VC++6 just-in-time debugger doesn't give me any information about which module is incriminated :'(
I tried to disable as much PHP extensions as I could. SimpleSamlPHP needs openSSL and PDO/MySQL, thus I kept only those 2 enabled, and crash happens anyway. I checked separately that using openSSL and MySQL works fine.
Finally I have to precise that the machine hosts 3 instances of PHP, including 2 in EasyPHP (2 separate installs), but only the concerned instance is active when the crash happens.
Any leads ?
Cheers
Did you run php with apache's mod_php? I had the same situation here. It always crashes when a sp authentication comes in. I have no idea how this happened. But at the end, I avoided the problem by running php in FastCGI mode.
Related
I wanted to setup PHP on my IIS server (Server 2012). Used the Web Platform Installer (because my server knowledge is nearly none) to install some PHP versions and activated 5.4.24 as the current one. Afterwards I enabled CGI by going into Handler Mappings. When I then try to run a basic php script just an echo "test" or phpinfo() I get a 500 server error.
I've gone through several of the topics already on google or stackoverflow but so far I haven't really found a point to start looking into this further. Can this be something related to rights? Because after I installed PHP plesk also failed which was due to rights not being set.
One possible cause is that when the PHP handler was configured on IIS, the access to the PHP CGI executable (C:\Users\lextudio\Downloads\php-8.1.9-nts-Win32-vs16-x64\php-cgi.exe) was not properly set up.
One quick solution is to grant IIS_IUSRS group read access on the folder (C:\Users\lextudio\Downloads\php-8.1.9-nts-Win32-vs16-x64).
I have a stupid problem that is driving me nuts at the moment.
Our web apps are pretty small so we run them on a shared hosting environment. Therefore I don't have a lot of possibilities to change the server configuration. The only thing I can do is edit the php.ini that is used for our domain. Configuration of everything else is out of my reach.
That's why I wanted to set up a local Vagrant server that is as close to the production server as possible by installing the same PHP Version (almost! in Vagrant it is PHP 5.4.43, the production server however runs PHP 5.4.16) and using the same php.ini that is also used online.
Both servers are running Apache 2.4 and PHP via FastCGI using PHP-FPM.
However, when I try to start up PHP-FPM in the Vagrant machine with the php.ini that I have downloaded from the administration panel of our hosting provider, it exits with some fatal errors because some of the directives in the given php.ini are deprecated and have been removed. That made me wonder why the same php.ini refuses to work in Vagrant, but works online without problem.
As phpinfo() on the production server tells me, the downloaded ini file is the only php.ini that is being loaded. However, the file seems to be ignored and instead the default values are applied.
So I figure that particular ini file is a hangover from ancient times of our production server, and it is just as invalid on the production server as it is on my Vagrant machine - the error handling is just different! The production server handles the error gracefully, ignoring the invalid ini file silently, but my Vagrant machine refuses to work.
Ignoring the invalid ini file is obviously no solution to the root of the problem, but curiosity struck me. I thought this should be easy, but after googling for a while, I am still stuck. How and where can I configure PHP-FPM to ignore invalid ini files, instead of exiting with a fatal error?
So, I have been talking to our hoster's support team in the past days and I got an answer to how they achieved this behavior.
The answer is simple and at the same time frustrating: They are running a customized build of PHP. They patched PHP's error handling to ignore ini errors instead of throwing a fatal error and then compiled PHP themselves.
Consequently this is no standard PHP behavior and would be quite time-consuming to implement by oneself. It is definitely not worth the work for my purpose.
Firstly forgive me if my terminology isn't entirely accurate. I have only limited knowledge on this subject, but will best try to convey the problems we are having. My server administrator is trying to deploy php 5.5.9 on a live server. Originally the intention was to install php 5.4.x, but we opted for the latest version instead (a manual compile is required regardless due to the o/s)
The O/S is OpenSuse 12.1 and the server is a Plesk server (Plesk Version 11.0.9) with Apache 2.2.1. This particular o/s does not have the ability to update php automatically so everything has to be done manually. Since we didn't want to risk screwing up the server (currently running with php 5.3.8), we opted to install a second version of php alongside the current one. The instructions we followed are outlined here: http://kb.parallels.com/en/114753
After numerous failed attempts due to missing libraries during compilation, we were finally able to compile php 5.5.9 without error and then proceeded to run tests with 'make test'
Unfortunately, the test results came back with 32 failures and 20% of the total tests were skipped. A total of 13011 tests were done, 10410 of which were completed. The TEST SUMMARY can be downloaded from here: http://uploaded.net/file/v6ug55l8
Anyway, deciding we might aswell give it a try, we applied the changes as indicated in the first link above to the vhost.conf. However, it didn't work, and the vhost then returned Internal Server Errors for every page regardless of script or extension. The errors logs sadly do not indicate any errors, only a whole ton of internal server errors recorded by mod_security. We did notice a huge number of these in the error log: Warning: SuexecUserGroup directive requires SUEXEC wrapper. But, it doesn't seem to be related, as the same error goes back several weeks.
So, we're stuck without any idea what to do next. Our next attempt will be to try and compile a php 5.4.x instead, as perhaps something is bumping heads with 5.5.9...
Any and all advice will be appreciated. As per the opening statement, I'm not an expert here, so if you need any additional information about the machine and it's server, feel free to ask. Thankyou for your attention!
Problem solved. The vhost's CGI-BIN needed to be CHMOD 755 and not 775.
I need to install large sites locally on two developers workstations. The sites are written in php5 with parts in Zend 1.10 and the database is MySQL. The production server runs on windows server 2003 . The sites are already running on windows vista on a development station and on windows 7 on another one.
On two workstations where i have to install (a windows xp and a windows 7), the same strange phenomenon occurs: after a few successfull requests apache freezes and no longer responds to any query. The site does not work until a reboot of Apache that takes quite a long time (> 30 seconds) . There is nothing in Windows Event Viewer or in the apache logs. Handle.exe tells me nothing and even freezes when apache starts to hang. Windows tasks manager shows nothing unusual. I have compared the host file , php.ini , httpd.conf and httpd.vhost.conf with stations that work without finding any difference.
The configuration includes mod_rewrite , mod_proxy , apc , memcached. Apache version is 2.2 and PHP 5.3.x (thread safe). The code is under version control, database and data directories are synchronized.
Not familiar with windows , I'm looking for tools or assumptions to solve this problem .
I provide some information about a temporary solution I applied. I noticed that a fraction of the php code was executed before Apache freezes.
Execution stops within a Zend Class, Zend_Validate_Ip in the setOptions method. At this time, the file is locked for writing and held by httpd.exe.
I found that this file was slightly different from the original version (Zend 1.11.11) : the require_once have been removed. This is an acceptable optimization recommended by the official documentation.
However, restoring the require_once in that file, the problem is solved. Apache no longer freezes and everything works. So there must be a problem with class loading but I do not understand exactly what it is.
I am trying to get a trial copy of the aMember membership management system running on my local dev machine, which is Windows 7 64-bit with IIS 7.5. I have MySQL 5.5.10 and PHP 5.3.6, the latter which I installed using the Windows installer package. It seems fine.
The aMember package has a tester.php script which I ran, and it gave an 'OK' result, despite its output being full of error messages related to Function eregi() is deprecated. I then ran the setup.php script, which seemed to run properly. It took me through one or two screens of gathering e.g. login information for MySQL, and then said it was completed and offered me links to some aMember admin pages. None of these links work, and clicking any of them results in an Internal Server error (HTTP 500): An unexpected condition was encountered while the server was attempting to fulfill the request.
What can I do to further diagnose this error, short of placing lots of diagnostic writes in the php pages themselves? Tools at my disposal are Aptana Studio and Visual Studio, although I doubt the latter is any use here. I have logged the issue with aMember support, who quickly asked for my server logs, and then disappeared.
My first port of call here would be to enable Failed Request Tracing:
Troubleshooting Failed Requests Using Tracing in IIS 7
Troubleshoot with Failed Request Tracing
I am also suspicious about your PHP install. As a rule of thumb never use the installers. They never seem to do the right thing.
I would tear down your PHP install and start from scratch using these steps:
Using FastCGI to Host PHP Applications on IIS 7
FastCGI + the Non-threadsafe build of PHP (5.2 or 5.3) is the definitive way to install and configure PHP on IIS7.
The aMember trial software uses encoded PHP which requires IonCube to decode. I had installed this, but it seems the installation had failed, as a subsequent installation remedied the problem. I was initially stumped because after installing IonCube, I ran the aMember test script which told me IonCube was installed. aMember support responded that:
unfortunately tester script is not handle situation with dynamic loading correctly.
PHP from 5 version do not allow to load libraries dynamically if these libraries are not in php lib folder. So you have to install IonCube or Zend into server php.ini'
I don't know why that can't build a warning into the test script.