Tuleap: cannot not attach file in Tracker - php

Trying to attach a file (image) to an artifact in Tracker I've got an error:
2018/07/11 13:16:04 [error] 3553#0: *1299 FastCGI sent in stderr: "PHP message: PHP Warning: mkdir(): Permission denied in /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_File.class.php on line 955
PHP message: PHP Warning: chown(): Operation not permitted in /usr/share/tuleap/src/common/backend/Backend.class.php on line 185
PHP message: PHP Warning: chgrp(): Operation not permitted in /usr/share/tuleap/src/common/backend/Backend.class.php on line 222
PHP message: PHP Warning: move_uploaded_file(/var/lib/tuleap/tracker/447/105): failed to open stream: No such file or directory in /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_File.class.php on line 966
PHP message: PHP Warning: move_uploaded_file(): Unable to move '/tmp/phpinBdbP' to '/var/lib/tuleap/tracker/447/105' in /usr/share/tuleap/plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Field_File.class.php on line 966" while reading response header from upstream, client: 10.73.12.147, server: tuleap, request: "POST /plugins/tracker/?aid=4&func=artifact-update HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "tuleap", referrer: "https://tuleap/plugins/tracker/?aid=4"
The artifact is updated without visible errors in GUI, but the changeset is empty, the image is not displayed.
I followed the full installation process when set up Tuleap (no Docker).
SELinux is disabled as suggested in this guide.
CentOS 7, Tuleap™ 10.1.99.104

It seems to have been a bug in this particular build of Tuleap.
Workaround:
chown -R codendiadm:codendiadm /var/lib/tuleap/tracker/
More info in the official bugtracker:
https://tuleap.net/plugins/tracker/?aid=11821

Related

PHP-FPM with NGINX - Error log missing line breaks after update

I'm working on a update for a old system whose versions are PHP7.1, NGINX 1.10.1 on an old Ubuntu 14.04.4.
The apps logs were displayed like this:
2022/03/10 07:05:40 [error] 23694#23694: *89040 FastCGI sent in stderr: "PHP message: .
PHP message: ..................................................[ Developer Version ]
PHP message: .
PHP message: Started GET / (1.2.3.4:34210)
PHP message: Parameters = []
PHP message: Resource Selected: ControllerName
PHP message: Session started: [123 , (**anon**)]
PHP message: Response = {"class":"HtmlResponse","code":200}" while reading response header from upstream, client: 1.2.3.4, server: oldserver.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.1-fpm.sock:", host: "4.3.2.1"
However, after upgrading to Ubuntu 20.04.4, PHP 8.0.16 and Nginx 1.18.0 all my logs are clumped together without the line breaks, like this:
2022/03/10 07:49:17 [error] 44423#44423: *1 FastCGI sent in stderr: "PHP message: .PHP message: ..................................................[ Developer Version ]PHP message: .PHP message: Started GET /url-name (1.2.3.4:58262)PHP message: Parameters = []PHP message: Resource Selected: ControllerName message: Session started: [abc123 , (**anon**)]PHP message: Response = {"class":"HtmlResponse","code":200}" while reading response header from upstream, client: 1.2.3.4, server: servername.com, request: "GET /url-name HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php8.0-fpm.sock:", host: "servername.com"
The logs are created on dispatch.php file like this:
$logger->error('.');
$logger->error('..................................................[ Developer Version ]');
$logger->error('.');
And the $logger class basically calls the error_log method
error_log($pf.$msg);
Does anyone know to resolve this? Help appreciated, please
Just add new line
error_log( $pf . $msg . "\n");

Why is searching not returning results in Magento 1.9 with error messages appearing in nginx logs for FastCGI and Elastica?

I'm running Magento 1.9.4 on Ubuntu 18.04, PHP 7.2 with nginx 1.14 fronting it all. The shopping site is loading and navigable. However, when I search for a term, it does not list the matches in the drop-down and shows the no results page.
I can see the following message in the nginx error logs:
2020/05/22 14:54:51 [error] 1213#1213: *270 FastCGI sent in stderr: "PHP message: PHP Warning: array_keys() expects parameter 1 to be array, null given in /var/www/example.com/lib/Elastica/Status.php on line 69
PHP message: PHP Warning: in_array() expects parameter 2 to be array, null given in /var/www/example.com/lib/Elastica/Status.php on line 81
PHP message: PHP Notice: Undefined index: version in /var/www/example.com/lib/Elastica/Client.php on line 108" while reading response header from upstream, client: 72.71.71.72, server: www.example.com, request: "GET /catalogsearch/result/?q=trouser HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "www.example.com", referrer: "https://www.example.com/boutique/"
This was working prior to upgrading from Ubuntu 14.04 and PHP 7.0.
I need to find another job.
Magento is using Elastica client which in turn is pointing to AWS ElasticSearch service. I had to whitelist the host (Magento site) in the AWS ElasticSearch access policy in order for it to access the service.

FastCGI sent in stderr: "PHP message: PHP Warning: After migrating wordpress

I just migrate my old site from another vps to the new one. New vps is running easyengine v3.8 on a fresh debian 8 instalation.
The migration is done via rsync command. The steps of migration process are :
Create new wordpress site in new vps
Pointing DNS to new IP, new site running well.
Remove all wordpress files in /var/www/mydomain.com/htdocs
Dump mydomain.com's database in old vps
Migrating data ( including dumped database ) from old vps to new vps via rsync
Import database in new vps.
Edit wp-config.php
Unfortenately, my new site wasn't live at all. Instead, it gives a HTTP 500 error with blank white screen. Even after i enable WP_DEBUG, the screen still white with no message on it.
I've tried to deactivate all plugins, still no change. Then i look to error log ini /var/www/mydomain.com/logs/error.log, it show message like this :
2019/01/16 01:03:37 [error] 8811#0: *849 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
PHP message: PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
PHP message: PHP Fatal error: Unknown: Failed opening required '/var/www/html/mydomain.com/wordfence-waf.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0" while reading response header from upstream, client: 167.248.155.196, server: mydomain.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mydomain.com"
From this message, I notice there is a different webroot location, old webroot is located under /var/www/html/mydomain.com , while new webroot is located under /var/www/mydomain/htdocs.
is there any suggest? Thank you.

fail to open file in laravel.The localhost page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500

When I try to run my project, I am getting this error in terminal.
[Fri Mar 30 14:36:23 2018] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
[Fri Mar 30 14:36:23 2018] PHP Fatal error: Unknown: Failed opening required '/var/www/html/imporeexcel/public/server.php' (include_path='.:/usr/share/php') in Unknown on line 0
I confirmed the issue, it seems a bug in laravel 5.6.12 installer. It deletes the server.php upon the first artisan serve.
A temporary solution will be to create another project then copy that newly created server.php this will solve it.
EDIT:
If your anti-virus is avast, you need to add exception there, I have a response in GitHub that avast considers it as a threat.

CakePHP on production server issues (CentOS)

So I just moved my files to a production server (CentOS), where my DocumentRoot would be /srv/www/example.com/app/webroot. when accessing through a browser I get the following error.
PS: I have set apache to user group www-data and that group is owner of /home/user/ and its subfolders (containing CakePHP core) and also the group is owner of /srv/www/.
[15-Mar-2014 19:47:46] PHP Warning: SplFileInfo::openFile(/srv/www/example.com/app/tmp/cache/persistent/myapp_cake_core_file_map) [<a href='function.SplFileInfo-openFile'>function.SplFileInfo-openFile</a>]: failed to open stream: Success in /home/user/cakephp-core/cakephp-2.4.6/lib/Cake/Cache/Engine/FileEngine.php on line 355
[15-Mar-2014 19:47:46] PHP Warning: SplFileInfo::openFile(/srv/www/example.com/app/tmp/cache/persistent/myapp_cake_core_cake_dev_en-us) [<a href='function.SplFileInfo-openFile'>function.SplFileInfo-openFile</a>]: failed to open stream: Success in /home/user/cakephp-core/cakephp-2.4.6/lib/Cake/Cache/Engine/FileEngine.php on line 355
[15-Mar-2014 19:47:46] PHP Warning: _cake_core_ cache was unable to write 'cake_dev_en-us' to File cache in /home/user/cakephp-core/cakephp-2.4.6/lib/Cake/Cache/Cache.php on line 325
[15-Mar-2014 19:47:46] PHP Fatal error: Call to undefined function error_get_last() in /home/user/cakephp-core/cakephp-2.4.6/lib/Cake/Core/App.php on line 911
Just noticed my PHP version is 5.1, this is probably the issue, getting 5.5. Close please.
Check if the app/tmp/ folder is writable by your web server user.

Categories