Without any -apparent- reasons, one of my cakePHP websites (v1.3.11) has stopped working (showing a "no data received" page in chrome - error 324) but the other is still fine -for the moment at least-.
/var/log/apache2/error.log shows a [notice] child pid 8502 exit signal Segmentation fault (11)
and /var/log/messages shows kernel: [15482058.932226] apache2[8502]: segfault at 7fff7f14fb58 ip 7f1b9d886e55 sp 7fff7f14fb60 error 6 in libphp5.so[7f1b9d576000+588000]
Here's my php -v
PHP 5.2.6-1+lenny13 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 1 2011 16:01:01)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
I absolutely have no idea on what heppened, so any idea is welcome.
EDIT:
It looks like the render() function in the /cake/libs/controller/controller.php is doing an infinite loop. Any ideas why this is happening? (it's happening on all the pages of the website and no code has changed lately...)
I had the same issue with cakephp 2.2.1.
I've resolved the issue by adding flush() in App.php's load function.
public static function load($className) {
if (!isset(self::$_classMap[$className])) {
return false;
}
flush();
...
I just downgraded my framework to what it was before thanks to a backup of those files I've done just before the updated and everything's fine now again.
Maybe something was wrong during the upload or something is not compatible with the latest version of the framework. I'll do some tests later about it and I'll comment on this "solution".
on core.php
Configure::write('debug',0);
I wonder if this might be regression in the last security update of Debian. I get very similar errors as you have, but we are not running cake. If we can confirm this, we should file a bug at Debian.
/var/log/messages[39144630.700032] apache2[13693]: segfault at 7fffff7fdfb8 ip 7f5195606a6a sp 7fffff7fdf50 error 6 in libphp5.so[7f519535c000+588000]
/var/log/apache2/error.log[error] child died with signal 11
$ php -v
PHP 5.2.6-1+lenny13 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul 1 2011 16:01:01)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
FYI I had the same problem today. Turning off debug kit solved it for me
I suddenly got this problem after I added post editing to the blog tutorial on a local virtual host.
For me, this problem went away when I went back through my files and found a syntax mistake. Once I fixed the syntax, it worked just fine.
For what it's worth, turning off DebugKit solved this problem for me in CakePHP 2.3.5. Except for adding DebugKit, the CakePHP installation is completely fresh. I got the same error 324 in Chrome as mentioned in the original post.
Related
A web site is sending requests to a server with XMLHttpRequest and FormData object. Files are added to it. It works fine most of the time but sometimes, it fails with no message from server, no headers, nothing is received. The network monitor shows request headers but not response headers and I can't get any HTTP error code, it is empty !? If I retry this request multiple times, it succeed.
The problem seems to happen with Firefox (103.0b7), 102 and 101. I've also tried to reproduce with portable versions of Firefox 97, 100 and 101 but I can't.
I can't reproduce it with Vivaldi (5.3.2679.68) or Edge (103.0.1264.49).
I've checked the Apache and FPM logs.
FPM access log says : error 500
Apache access log says : error 400
Apache error log says : proxy_fcgi:error (103) Software connection abort: [client IP-Address:port] AH01075: Error dispatching request to : (reading input brigade), referer : sender-url (I've replaced real IP-Address:port and sender-url).
Here is the server configuration even if I don't think the problem is here :
$> php -v
PHP 7.4.28 (cli) (built: Feb 17 2022 16:17:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
$> apache2 -v
Server version: Apache/2.4.53 (Debian)
Server built: 2022-03-14T16:28:35
Is there something else I can check to find the problem ?
[EDIT]
It seems to be resolved with Firefox versions 104 and later. On 103 the bug was still there.
I find in my error log (/var/log/php-fpm/www-error.log, every-now-and-then, the following gem:
[27-Jun-2022 12:36:39 UTC] Generic Error
I can't find anything on the web discussing "Generic Error" ...
I have recently upgraded the sw stack (AWS Linux 2, with sudo yum update) and I am wondering if something internal to PHP changed in the way it works, and is now throwing this error under some condition.
Since the application is working just fine, I am at a loss. But the error in my log is annoying...
(I don't use any frameworks. The code above PHP libraries is mine, and I do not throw this...)
php-fpm -v:
PHP 7.4.19 (fpm-fcgi) (built: May 13 2021 22:37:56)
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
uname -r:
4.14.200-155.322.amzn2.x86_64
cat /etc/os-release:
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
I have been using the CLI interface to send out cron jobs from my codeigniter page. It worked fine until I updated Wordpress yesterday. I do not know how this effected Codeigniter but that is when the trouble started. I also installed cURL at about the same time. I am not sure if that could have made a difference.
SYMPTOMS:
None of my codeigniter CLI scripts work. I have two scripts that send out email reminders, and another that synchronizes my database and none function.
ERRORS:
I had some errors come up when I tried to run my scripts such as:
Use of undefined constant __DIR__ - assumed '__DIR__'
This was never a problem before. But for now I change that to
dirname(__FILE__)
and that seemed to help. At least that error stopped.
Next another error notice appeared regarding code in my scripts that I was not getting before: "Can't use method return value in write context in . . ."
This error was in reference to this line of code:
if (!empty($this->get_available_hours($date, $provider_id))) {
I modified this to
$availabehours=$this->get_available_hours($date, $provider_id);
if (!empty($availabehours)) {
And the error stopped. But the script usually sends out email regarding availability and no email is sent.
Now I have no errors. I run the scripts and I get no results. If I purposefully mess with the code and do things wrong, I get the appropriate error messages. So, at some level it is reading the file.
I tried just running a simple "hello world file" as discribed here
https://ellislab.com/codeigniter/user-guide/general/cli.html
And nothing was returned.
I tried a simple email script that would send out an email without accessing my database and it did not send anything to me.
It appeares to me like something has caused my code to be interpreted in an older version of php. So I looked at the version currently running:
When logged into the terminal in PuTTY I get:
PHP 5.2.17 (cli) (built: Feb 23 2012 10:42:34)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
Out of date ...
But when I look in the terminal within WinSCP I get:
PHP 5.5.28 (cli) (built: Sep 4 2015 12:07:49)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
This looks up to date.
Running this works: php -r 'echo "Hello World!\n";'
MY QUESTIONS:
1) What tests can I run to find out what is blocking things with my CLI?
Any tips would be appreciated.
2) Why am I seeing two different versions of PHP depending on the terminal I am running and could this be the cause of my problem?
Hi there i followed these instructions (http://pietervogelaar.nl/php-xdebug-netbeans-vagrant/) to get XDebug up and running with vagrant and NetBeans.
It now works .... almost.
Anytime i run a code that fire a breakpoints, NetBeans works fine allowing me to do my debug thing with no problems.
The thing is at the end of the request Laravel will always return that error :
Call to a member function getAction() on a non-object, specifying a code location that looks weird : xdebug://debug-eval:1.
Even stranger, my page is rendered and the html is here, but the standard laravel error page is rendered also, at the end of my own page ......
Of course if i disable my breakpoint, everything runs just fine.
My versions right now :
Apache :
Server version: Apache/2.2.22 (Ubuntu)
Server built: Apr 17 2014 21:49:25
PHP :
PHP 5.4.28-1+deb.sury.org~precise+1 (cli) (built: May 5 2014 09:32:44)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
Ok i finally found it.
Problem doesn't come from XDebug or Php or Laravel.
Problem comes from Netbeans.
I had an expression in my watch list i wasn't using anymore.
Deleting every custom entries in the watch list just solves the issues.
Hope at some point it helps someone else ....
DISCLAIMER - I am total PHP noob - looking for some help/tips on how to debug this problem...
I have a PHP/CakePHP based app running on Linux/CentOS and MySQL.
Its also running on my local dev machine (OSX Snow Leopard).
One small part of the app however is behaving inconsistently between the two.
I have copied the DB and the PHP code from the server to my local machine - so pretty sure they are in sink. Note the app was originally developed elsewhere and then deployed to the server.
The different is that there is a master/detail type page - on both sites the master part works fine, but the detail part is only working for my local/OSX version.
I have checked the DB and the detail records seem to be present as expected.
The PHP version is slightly different.
Linux Server:
HP: Error parsing /usr/local/lib/php.ini on line 803
PHP 5.2.16 (cli) (built: Mar 1 2011 11:48:38)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd.
Server version: Apache/2.2.17 (Unix)
Server built: Mar 1 2011 11:42:56
Cpanel::Easy::Apache v3.2.0 rev5291
OSX Local:
PHP 5.3.3 (cli) (built: Aug 22 2010 19:41:55)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
Server version: Apache/2.2.15 (Unix)
Server built: Jul 1 2010 17:16:33
I have tried restart Apache, in case it was a caching issue. I have tried changing master details via mysql command line and those changes are being shown.
Tried turning on display_errors/display_startup_errors - but nothing is being shown.
Wonder if there are any CakePHP debug tips... perhaps should look into that.
My plan is to install the app on another server to see if that works and/or helps identify the difference/issue.
The PHP code that seems to be the issue is this (its in one of the cakePHP controllers):
$carInsuranceQuoteRequest = $this->CarInsuranceQuoteRequest->find('first', array(
'conditions' => array(
'CarInsuranceQuoteRequest.id' => $id,
) ,
'contain' => array(
'Company' => array(
'Attachment'
),
'CarInsuranceVehicleType',
'CarInsuranceVehicleMake',
'CarInsuranceVehicleModel',
'CarInsuranceVehicleVersion',
'CarInsuranceCoverageType',
'CarInsuranceQuoteResponse' => array(
'CarInsuranceQuoteSite'
),
),
));
The quote request object is being returned ok on both installs. But the quote response object is always empty on the linux box, even though they seem to be ok in the mysql db. The responses are being displayed fine under OSX.
The PHP error on line 803 is
; url_rewriter.tags: (ini file field description not available)
url_rewriter.tags = a=href,area=href,frame=src,input=src,form=,fieldset=
Thanks in advance for any tips, Chris
FWIW - my problem was due to the cakePHP models being wrong and so it wasnt able to navigate the relations. I had changed the mysql table. For some reason it got over the issue on my local machine.
Chris,
Try turning on CakePHP debug output in your app. In the file app/config/core.php you should find a line like this setting the CakePHP debug level:
Configure::write('debug', 0);
Change it to:
Configure::write('debug', 1);
or a higher value. This should produce some error output and get you going in the right direction in narrowing down the source of your problems.
Remember to set it back to 0 for a production configuration. The documentation for this is as follows:
/**
* CakePHP Debug Level:
* * Production Mode:
* 0: No error messages, errors, or warnings shown. Flash messages redirect.
*
* Development Mode:
* 1: Errors and warnings shown, model caches refreshed, flash messages halted.
* 2: As in 1, but also with full debug messages and SQL output.
* 3: As in 2, but also with full controller dump.
*
* In production mode, flash messages redirect after a time interval.
* In development mode, you need to click the flash message to continue.
*/
Also remember to check your Apache error log file for any helpful output.