I have another problem with framework WSF/PHP. Most of the time (not always, but still), when i run my script it ends with lost connection. There's no error page or anything, just error connecting with host (via localahost).
Here's my code:
<?php
$server_location = "https://some.address";
$clientCert_location = "clientCert.pem";
$CACert_location = "CACert.cer";
$passphrase = "some.password";
$request = file_get_contents("./requests/example.xml");
$action = "some.action";
$rec_cert = ws_get_cert_from_file($CACert_location);
$pvt_key = ws_get_key_from_file($clientCert_location);
$sec_token = new WSSecurityToken(array("privateKey" => $pvt_key,
"receiverCertificate" => $rec_cert));
$client = new WSClient(array("useSOAP" => "1.1",
"policy" => new WSPolicy(array()),
"securityToken" => $sec_token,
"to"=>$server_location,
"action" => $action,
"CACert" => $CACert_location));
try {
$response = $client->request($request);
} catch (Exception $e) {
if ($e instanceof WSFault) {
$response = "Soap Fault: ".$e->Code."\n";
} else {
$response = "Message = ".$e->getMessage()."\n";
}
}
?>
And here's error log from apache:
[Mon Aug 29 11:13:41 2011] [info] Cannot find path D:\Aplikacje\wsf-php-2.1.0\wsf_c/services.
[Mon Aug 29 11:13:41 2011] [info] [rampart] rampart_mod initialized
[Mon Aug 29 11:13:41 2011] [info] [rahas]Rahas module initialized
[Mon Aug 29 11:13:41 2011] [error] ..\..\axiom\src\om\om_document.c(102) Unable to get root node
[Mon Aug 29 11:13:41 2011] [info] Starting addressing out handler
[Mon Aug 29 11:13:41 2011] [warning] ..\..\src\core\context\msg_ctx.c(1384) RampartClientConfiguration not set in message context
[Mon Aug 29 11:13:41 2011] [info] [rampart][rampart_signature] No parts specified or specified parts can't be found for Signature.
OPENSSL_Uplink(100EC020,08): no OPENSSL_Applink
[Mon Aug 29 11:13:41 2011] [notice] Parent: child process exited with status 1 -- Restarting.
[Mon Aug 29 11:13:41 2011] [info] [rampart] rampart_mod shutdown
[Mon Aug 29 11:13:41 2011] [info] [rahas] Rahas module shutdown
[Mon Aug 29 11:13:43 2011] [notice] Apache/2.2.19 (Win32) PHP/5.3.6 configured -- resuming normal operations
[Mon Aug 29 11:13:43 2011] [notice] Server built: May 20 2011 17:39:35
[Mon Aug 29 11:13:43 2011] [notice] Parent: Created child process 4636
[Mon Aug 29 11:13:44 2011] [info] Cannot find path D:\Aplikacje\wsf-php-2.1.0\wsf_c/services.
[Mon Aug 29 11:13:44 2011] [info] [rampart] rampart_mod initialized
[Mon Aug 29 11:13:44 2011] [info] [rahas]Rahas module initialized
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Child process is running
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Acquired the start mutex.
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Starting 64 worker threads.
[Mon Aug 29 11:13:44 2011] [notice] Child 4636: Starting thread to listen on port 80.
Help will be much appreciated;)
EDIT:
I figured that out. My PATH was missing the .../php/ext location, so wsf.dll couldn't be found. However, it's not the end of my problem. More are comming... ;)
EDIT2:
Nope... It wasn't it:(
If anyone would be interested in how did it end, i solved the problem by upgrading apache-httpd to 2.2.21 and using wse-php instead of wsf-php.
Related
Okay, first of all I understand and ... permit ... you all to laugh: I have a local server running php 4,4 / apache / mysql - installed with xampp distribution. Just simply haven't got the time to upgrade all the code that has been serving me for years and is still serving me well :-)
To the issue - I can't make a try/catch ... beeeecause of the old php version. I have a script that parses a dir and to a lot of things to all the files ... and after several 100 thousand files over the years without problems ... I now find that the server shuts down / browser looses connection probably because of a single file ... but for my life I can't figure out which. So thought maybe I could figure it out through the error log. But ... I didn't learn much - and thought I might ask some wise guys here if there is anything I can learn from the following from my error log - regarding maybe what function/file or whatever it is that causes the breaking...:
[Tue Feb 14 20:47:26 2017] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Tue Feb 14 20:47:26 2017] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Tue Feb 14 20:47:26 2017] [notice] Apache/2.0.54 (Win32) mod_ssl/2.0.54 OpenSSL/0.9.8 PHP/4.4.0 mod_autoindex_color configured -- resuming normal operations
[Tue Feb 14 20:47:26 2017] [notice] Server built: Jul 28 2005 18:10:37
[Tue Feb 14 20:47:26 2017] [notice] Parent: Created child process 5384
[Tue Feb 14 20:47:27 2017] [notice] Child 5384: Child process is running
[Tue Feb 14 20:47:27 2017] [notice] Child 5384: Acquired the start mutex.
[Tue Feb 14 20:47:27 2017] [notice] Child 5384: Starting 250 worker threads.
[Tue Feb 14 20:47:36 2017] [notice] Parent: child process exited with status 3221225725 -- Restarting.
[Tue Feb 14 20:47:36 2017] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Tue Feb 14 20:47:36 2017] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Tue Feb 14 20:47:36 2017] [notice] Apache/2.0.54 (Win32) mod_ssl/2.0.54 OpenSSL/0.9.8 PHP/4.4.0 mod_autoindex_color configured -- resuming normal operations
[Tue Feb 14 20:47:36 2017] [notice] Server built: Jul 28 2005 18:10:37
[Tue Feb 14 20:47:36 2017] [notice] Parent: Created child process 3136
[Tue Feb 14 20:47:36 2017] [notice] Child 3136: Child process is running
[Tue Feb 14 20:47:36 2017] [notice] Child 3136: Acquired the start mutex.
[Tue Feb 14 20:47:36 2017] [notice] Child 3136: Starting 250 worker threads.
Got it ... filesize() was failing (silent aparently) for some file(s). Ran it w/o this function and it worked. Case closed...
Edit: strange though ... filesize() suddenly fails on all files. And they are local. Subdir to the htdocs folder ... and the top level folder to this structure is set to all my users to have full control of this folder and all subfolders... weird...
I'm here to ask about a strange behaviour of Apache with accents:
this rule works just fine
RewriteRule ^([èéìòùa-zA-Z0-9_\-\s]*)$ index.php?route=$1 [L]
but if i dare to add an 'à'
RewriteRule ^([àèéìòùa-zA-Z0-9_\-\s]*)$ index.php?route=$1 [L]
Apache loses his mind (Yes, I can hear you reading this with the Joker voice)
Can anyone explain this to me?
UPDATE: Error log
[Wed Nov 12 12:49:43 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Nov 12 12:49:43 2014] [notice] Apache/2.2.21 (Win64) mod_ssl/2.2.21 OpenSSL/1.0.0g PHP/5.3.10 configured -- resuming normal operations
[Wed Nov 12 12:49:43 2014] [notice] Server built: Sep 24 2011 19:57:51
[Wed Nov 12 12:49:43 2014] [notice] Parent: Created child process 3304
[Wed Nov 12 12:49:43 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Nov 12 12:49:44 2014] [notice] Child 3304: Child process is running
[Wed Nov 12 12:49:44 2014] [notice] Child 3304: Acquired the start mutex.
[Wed Nov 12 12:49:44 2014] [notice] Child 3304: Starting 64 worker threads.
[Wed Nov 12 12:49:44 2014] [notice] Child 3304: Starting thread to listen on port 80.
[Wed Nov 12 12:49:44 2014] [notice] Child 3304: Starting thread to listen on port 80.
I am trying to track down the cause of my Apache PHP crashes. I am hoping there is some kind of setting, tool or something to help track down what code, configuration or what the issue is that is causing these php crashes.
In my Windows event log I have (shows apache crashing, but caused by php):
Faulting application httpd.exe, version 2.2.21.0, time stamp 0x4e6b3136, faulting module php5ts.dll, version 5.3.8.0, time stamp 0x4e537a04, exception code 0xc0000005, fault offset 0x0000c7d7, process id 0xbf4, application start time 0x01cd45afc42f0b7d.
The application utilizes Apache, PHP and MySQL on a Windows Server 2008 machine (xampp).
This is the crash in my Apache log:
[Fri Jun 08 15:56:34 2012] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Fri Jun 08 15:56:35 2012] [notice] Digest: generating secret for digest authentication ...
[Fri Jun 08 15:56:35 2012] [notice] Digest: done
[Fri Jun 08 15:56:35 2012] [notice] Apache/2.2.21 (Win32) PHP/5.3.8 configured -- resuming normal operations
[Fri Jun 08 15:56:35 2012] [notice] Server built: Sep 10 2011 11:34:11
[Fri Jun 08 15:56:35 2012] [notice] Parent: Created child process 1220
[Fri Jun 08 15:56:35 2012] [notice] Digest: generating secret for digest authentication ...
[Fri Jun 08 15:56:35 2012] [notice] Digest: done
[Fri Jun 08 15:56:35 2012] [notice] Child 1220: Child process is running
[Fri Jun 08 15:56:35 2012] [notice] Child 1220: Acquired the start mutex.
[Fri Jun 08 15:56:35 2012] [notice] Child 1220: Starting 150 worker threads.
[Fri Jun 08 15:56:35 2012] [notice] Child 1220: Starting thread to listen on port 80.
[Fri Jun 08 15:56:35 2012] [notice] Child 1220: Starting thread to listen on port 80.
[Fri Jun 08 15:57:37 2012] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Fri Jun 08 15:57:37 2012] [notice] Digest: generating secret for digest authentication ...
[Fri Jun 08 15:57:37 2012] [notice] Digest: done
[Fri Jun 08 15:57:37 2012] [notice] Apache/2.2.21 (Win32) PHP/5.3.8 configured -- resuming normal operations
[Fri Jun 08 15:57:37 2012] [notice] Server built: Sep 10 2011 11:34:11
[Fri Jun 08 15:57:37 2012] [notice] Parent: Created child process 3932
[Fri Jun 08 15:57:38 2012] [notice] Digest: generating secret for digest authentication ...
[Fri Jun 08 15:57:38 2012] [notice] Digest: done
[Fri Jun 08 15:57:38 2012] [notice] Child 3932: Child process is running
[Fri Jun 08 15:57:38 2012] [notice] Child 3932: Acquired the start mutex.
[Fri Jun 08 15:57:38 2012] [notice] Child 3932: Starting 150 worker threads.
[Fri Jun 08 15:57:38 2012] [notice] Child 3932: Starting thread to listen on port 80.
[Fri Jun 08 15:57:38 2012] [notice] Child 3932: Starting thread to listen on port 80.
Any thoughts on what I should try, or tools/techniques to trace back to what code, etc. might be causing this?
Since XAMPP's Apache (for Windows) is built with winn_nt MPM (multi-thread) + Thread-Safe PHP, it may be that you are hitting a problem inherent to the supposedly Thread-Safe versions of PHP (see this very good post for more information). This could explain why you never encounter the error when running in a single-user mode.
Please let us know if Uku Loskit's suggestion did any good. If not, I would recommend switching to a Prefork + Non-Thread-Safe PHP setup in such a multi-user environment.
Because MPM must be chosen at compile-time, you would need to either:
compile Apache yourself (technically feasible, but quite a pain in the neck on Windows, as far as I remember)
find a distribution other than XAMPP, which is built with prefork (I do not know any)
Perhaps you'd better try to run PHP with FastCGI (this extra layer basically isolates server threads by starting a separate PHP process for each thread, and much more). This should allow you to verify easily enough my initial assumption.
Just a side note: I do not see the point in installing Apache on a Windows Server. You may want to consider either using IIS, optionally with FastGCI (see instructions here), or (better) switch to a Linux-based stack.
Hi setup new code ignitior application on my local machine.
RewriteEngine on
RewriteCond $1 !^(index\.php|public|tmp|user_guide|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]
This is .htaccess file content
and below is the config file content
$config['base_url'] = "http://localhost/myapp";
$config['index_page']= ""; $config['uri_protocol'] = "REQUEST_URI";
when i try to access application using http://localhost/myapp url gives ERROR 500
Error 500 localhost 10/05/11 20:43:26 Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.3
So any idea what is the problem
[Wed Oct 05 21:50:22 2011] [alert] [client 127.0.0.1] C:/xampp/htdocs/myapp/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
[Wed Oct 05 21:50:33 2011] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Wed Oct 05 21:50:33 2011] [notice] Child 4812: Exit event signaled. Child process is ending.
[Wed Oct 05 21:50:34 2011] [notice] Child 4812: Released the start mutex
[Wed Oct 05 21:50:35 2011] [notice] Child 4812: Waiting for 250 worker threads to exit.
[Wed Oct 05 21:50:35 2011] [notice] Child 4812: All worker threads have exited.
[Wed Oct 05 21:50:35 2011] [notice] Child 4812: Child process is exiting
Error in my_thread_global_end(): 1 threads didn't exit
[Wed Oct 05 21:50:43 2011] [notice] Parent: Child process exited successfully.
Error in my_thread_global_end(): 1 threads didn't exit
[Wed Oct 05 21:50:56 2011] [notice] Apache/2.2.4 (Win32) DAV/2 mod_ssl/2.2.4 OpenSSL/0.9.8e mod_autoindex_color PHP/5.2.3 configured -- resuming normal operations
[Wed Oct 05 21:50:56 2011] [notice] Server built: Mar 5 2007 11:23:00
[Wed Oct 05 21:50:56 2011] [notice] Parent: Created child process 4164
[Wed Oct 05 21:50:57 2011] [notice] Child 4164: Child process is running
[Wed Oct 05 21:50:57 2011] [notice] Child 4164: Acquired the start mutex.
[Wed Oct 05 21:50:57 2011] [notice] Child 4164: Starting 250 worker threads.
[Wed Oct 05 21:50:57 2011] [notice] Child 4164: Starting thread to listen on port 443.
[Wed Oct 05 21:50:57 2011] [notice] Child 4164: Starting thread to listen on port 80.
It seem obvious to me - just enable Apache's mod_rewrite.
http://www.astahost.com/info.php/Apache-Tutorial-Enable-Mod_rewrite-Windows_t11623.html
http://localhost/joomla/administrator/ The web browser returns an error that the page does not exist after I complete the installation and deleted the folder.
I have to use apache2. I am also using the latest version of apache, mysql. Im using php 5.2.13 VC6 x86 Thread Safe.
I used a combo of two tutorials:
Tutorial 1
Tutorial 2
When I chose mysql as the database it would give me the error right away but if I chose mysqli then I would be able to complete the installation then when I selected either client or administrator then I would get the browser error.
The only difference between the two tutorials is that I used PHPIniDir instead of copying and pasting it to apache.
httpd.conf
LoadModule php5_module "c:/datafiles/php/php5apache2_2.dll"
AddType application/x-httpd-php .php .phtml .inc .php3
AddType application/x-httpd-php-source .phps
PHPIniDir "c:/datafiles/php"
I also changed ServerName localhost:80 due to an error in the log.
error.log
[Fri Jul 09 07:05:21 2010] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Fri Jul 09 07:05:21 2010] [notice] Child 4108: Exit event signaled. Child process is ending.
[Fri Jul 09 07:05:22 2010] [notice] Child 4108: Released the start mutex
[Fri Jul 09 07:05:23 2010] [notice] Child 4108: All worker threads have exited.
[Fri Jul 09 07:05:23 2010] [notice] Child 4108: Child process is exiting
[Fri Jul 09 07:05:23 2010] [notice] Parent: Child process exited successfully.
[Fri Jul 09 07:06:23 2010] [notice] Apache/2.2.15 (Win32) PHP/5.2.13 configured -- resuming normal operations
[Fri Jul 09 07:06:23 2010] [notice] Server built: Mar 4 2010 11:27:46
[Fri Jul 09 07:06:23 2010] [notice] Parent: Created child process 3520
[Fri Jul 09 07:06:23 2010] [notice] Child 3520: Child process is running
[Fri Jul 09 07:06:23 2010] [notice] Child 3520: Acquired the start mutex.
[Fri Jul 09 07:06:23 2010] [notice] Child 3520: Starting 64 worker threads.
[Fri Jul 09 07:06:23 2010] [notice] Child 3520: Starting thread to listen on port 80.
[Fri Jul 09 07:08:00 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Fri Jul 09 07:08:00 2010] [notice] Apache/2.2.15 (Win32) PHP/5.2.13 configured -- resuming normal operations
[Fri Jul 09 07:08:00 2010] [notice] Server built: Mar 4 2010 11:27:46
[Fri Jul 09 07:08:00 2010] [notice] Parent: Created child process 6584
[Fri Jul 09 07:08:00 2010] [notice] Child 6584: Child process is running
[Fri Jul 09 07:08:00 2010] [notice] Child 6584: Acquired the start mutex.
[Fri Jul 09 07:08:00 2010] [notice] Child 6584: Starting 64 worker threads.
[Fri Jul 09 07:08:00 2010] [notice] Child 6584: Starting thread to listen on port 80.
[Fri Jul 09 07:08:01 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Fri Jul 09 07:08:01 2010] [notice] Apache/2.2.15 (Win32) PHP/5.2.13 configured -- resuming normal operations
[Fri Jul 09 07:08:01 2010] [notice] Server built: Mar 4 2010 11:27:46
[Fri Jul 09 07:08:01 2010] [notice] Parent: Created child process 5780
[Fri Jul 09 07:08:01 2010] [notice] Child 5780: Child process is running
[Fri Jul 09 07:08:02 2010] [notice] Child 5780: Acquired the start mutex.
[Fri Jul 09 07:08:02 2010] [notice] Child 5780: Starting 64 worker threads.
[Fri Jul 09 07:08:02 2010] [notice] Child 5780: Starting thread to listen on port 80.
All pre-installation checks are perfect.
I even tried the PHP installers from the two currently available version but they don't let me start apache.
edit: It was able to install with mysqli the data samples.
try Disabling each extension in php.ini file to see which extension is causing the crash .most of the time the "Curl Extension" would be the reason for the Crash.