I am having a very hard problem to solve, which is that my symfony application server terminates and never loads anything. The message is giving after running the: php bin/console server:run and then load the site in the browser. The browser starts loading the site but after a few minutes it throws this message in the console (not in the web browser): [ERROR] Built-in server terminated unexpectedly. Run the command again with -v option for more details..
I have tried to solve this problem in many ways:
Changed my OS to Windows (I am using Ubuntu 16.04). This did not work, the application just throw a blank page in the browser with not even one error.
Cleared cache.
Changed default port.
Please if any person has been involved in this situation and has left alive from it, help me out, I will appreciate it a lot...
I already solved the problem. I upgraded from php 7.0 to php 7.1, it is a bug of php I guess, I can't have any certain conclusion about what the problem was, but this solved it.
Related
last year i have purchased an encrypted script wich run two crons jobs, a month ago crons stop working and i have talk to the hosting company they said its script problem , The PHP cron file works fine without any errors when visited by browser, the script provider told me that this issue should be fixed by hosting service and refuse to help !
here the command used it run every 10 MIN /home/username/public_html/cron/cron.php
cPanel Version 64.0 (build 24)
Apache Version 2.4.25
PHP Version 5.6.30
my question is it true upgrading the PHP version will affect cron job and how can i solve this?
thanx
In short, yes, upgrading PHP can effect your scripts -- the crons aren't run by Apache or PHP; the crons run from the OS level.
Your PHP upgrade is most likely affecting the crons in one of two ways:
The upgrade was large, like PHP5.6 to PHP7.0 and there's a deprecation warning somewhere (which will output in the crons' log) or the script is running some code that's now fully deprecated; most likely a query or a class/method named after a reserved word. Your logs will have more info, just make sure you have debugging turned on, otherwise your errors will be suppressed.
The new PHP settings from the upgrade have disabled some of the allowed rules from an older PHP version, such as getting away with empty or unassigned variables, and now your script is running into errors (ie. using a variable that doesn't exist, such as $_REQUEST['something'], which would have been empty but now returns an error that effects the rest of the script).
To fix this you need to know what the problem is. The easiest way is to access the log files that crons often create. If you don't get that with your host, ask them for it, or ask them to send you a copy of the error that's being created -- a quick Google on the error will tell you what the problem is. But without knowing more about the script or the error log, you probably won't get a better answer.
old command is working its just me i did copy past from my old backup and i forget the PHP at the firts off command ! nothing has changed the command should be like that exp : php /home/username/public_html/cron/cron.php
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.
I am currently developing a web application with Symfony that's supposed to connect to a remote Web-Service. Then synchronise database from the client to the server and vice-versa and some other crap.
The Web-service server is on an IIS in the LAN.
Symfony2 is running with Wamp on my machine.
So, the connexion and request code to the web-service in a simple php script is perfectly functional. Or at least, it does what I want it to do.
And any connexion to the IIS server is perfectly fine.
A bit slow though, but the machine is quite a mess.
Now I put that same code into a Symfony2 class, and here comes the hell.
When I try to load that page, I get a
101 error (ERR_CONNECTION_RESET)
Web-service server's log indicates me that the login, request and response were sent.
So my guess is the problem is comin' from my machine, but not quite sure about it.
The really funny thing : I somehow managed to make it work for about 10 times.
Then 101 again...
I disabled the Windows 7 LAN firewall both side, same result.
Any clue is very welcome.
Thanks.
I spent hours debugging this with a colleague. He was getting the same error but it was working properly on my machine (we're using Windows 7, 64bit, WAMPServer 2.2d, 32bit).
Here is what the culprit was:
- the file TwigEngine.php had Unix-style line endings (LF) on my machine but on his machine it had Windows-style line endings (CR+LF)
- after changing the line endings to LF only, it works fine on his machine too
That would possibly explain the other answer above "all I needed to do is just resave
TwigBundle/TwigEngine.php" if the editor changed the format of the line endings.
The underlying cause was the installation of git, he had picked the default ("Windows-style check-outs") and I had selected "as-is").
After some more research. here is an explanation of the cause for this: https://github.com/symfony/symfony/issues/3216
Hopefully this helps someone else save some time.
I solve the problem...
I set the second parameter of AppKernel in app_dev.php to FALSE and now works fine
$kernel = new AppKernel('dev', FALSE);
I will continue investigating...
I had same problem after 4 hours of "debuging" i found that all I needed to do is just resave
TwigBundle/TwigEngine.php
I have no clue why
In fact, I think (in my case at least) those errors are twig related.
Sometimes, when there's a critical error related to twig logged in app/logs/dev.log, I got that 101.
Those critical errors are often syntaxic, so no real deal here.
And once they are dealt with, no problem anymore.
The strange thing is that sometimes, clearing the cache allows me to load the page 3 or 4 times.
Mike WP made it. TwigEngine need LF line endings to work properly. You can use this console command then you'll have to update/reinstall vendors.
git config --global core.autocrlf input
I had the same issue on Windows using XAMPP, and solved by:
composer require "twig/twig:^2.0"
I am running a PHP site that uses Ajax and jQuery as well. The site will run fine for quite some time, and suddently my pages (and ajax-retrieved sub-pages) comes back with the message
PHP has encountered an Access Violation at 77FCAFF8
It seems that rebooting the server corrects the issue. Running PHP Version 5.1.6 (Windows NT 5.0 build 2195). I did a some searching on here and some other sites, and there seems to be no fix..
URL REMOVED
UPDATE:
I think I'm on to something.. will get back to you.
UPDATE
After reviewing the IIS setup, i noticed there was no Handler Mapping setup for the website. This, of course begs the question - how did it ever work in the first place, when it was originally setup this way!? I added the handler mapping and it seems to be Okay so far.
UPDATE
The problem popped its heads out again this morning after 36 hours without encounering it. Back to the drawing board.
UPDATE
We ended up just moving the site to a secondary web server where we were able to upgrade PHP without an issue.
This is a PHP issue somewhere. You could spend some time narrowing down which function you're using that is causing the problem. I would instead upgrade to a newer version of PHP. If still no luck, try a slightly older version. There have been significant changes with version 5.3.2.
After some research I think this may be the solution (Taken from http://bugs.php.net/bug.php?id=28929 ):
[2010-06-11 15:12 UTC] in2ishun at yahoo dot com
***************** SOLUTION!!!!
I realize this issue is AGES old, but it still manages to be the top hit on Google searches as of now (6/2010).
I fixed my own instance of seeing this error. W2k3, IIS6, PHP 5.2.6, MySQL 5.1.
The problem is in the pathing. When I used the MSI installer for MySQL without doing an "advanced" installation (where I could manage the install details), it added a path to the system environment that contained spaces. Even after changing the path environment to use the Windows short-name location of the mysql bin directory, it still didn't work.
The solution was for me to reinstall mysql and set the default installation path to just off the root (e.g. C:\mysql). Once I did that the error went away and my app started working.
There are a number of sites with a variety of potential solutions to this issue and several of them mentioned paths and the "libmysql.dll" file (in the "bin" directory of your mysql installation).
If this helps you solve your problem, consider leaving a comment here so others can see that it works.
I have huge PHP script which I have been running on Apache 2.2.12 and I have recently upgraded to Apache 2.2.14. However, my PHP script doesn't work as it stops at a certain point all the time. I have been trying to work out what the difference is in these two Apache versions, I have looked at this CHANGELOG and have not been able to determine this.
When I look in my Apache error log, I find this before my PHP script fails to do anything else.
Parent: child process exited with status 255
The errors after this are just notices and they end after a few of these.
What changes in Apache do you think can cause this? I was reading around and I found a few people saying that newer versions of Apache on Vista (windows) can detect when a PHP script is in an infinite loop and will kill that child, is this true?
Thanks all for any input.
Update
Apologies, this is no longer relevant. I think its a PHP issue. I switched from 5.2 to 5.3 and I think its do with modules. I will be openning another question.
try this
download this
http://windows.php.net/downloads/snaps/php-5.2-win32-VC6-x86-latest.zip
then copy libmysql.dll into your php directory and restart apache
Actually it does not relate to modules, but to certain validations made by the core interpreter, which breaks many nonstrict processes in different PHP applications. Beware of updating PHP to 5.3! Mwahahahaha!