Vagrant + symfony2 ContentErrorException file not found but file is present - php

My Symfony2 project is throwing a exception:
Warning: file_get_contents(/Users/arne.banck/repos/Branditto_platform/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception_full.html.twig): failed to open stream: No such file or directory
The problem is that the file is there in my folder structure, I did pwd through terminal:
/Users/arne.banck/repos/Branditto_platform/vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Resources/views/Exception
The following files are in this map:
error.atom.twig exception.atom.twig exception_full.html.twig
error.css.twig exception.css.twig logs.html.twig
error.html.twig exception.html.twig trace.html.twig
error.js.twig exception.js.twig trace.txt.twig
error.json.twig exception.json.twig traces.html.twig
error.rdf.twig exception.rdf.twig traces.txt.twig
error.txt.twig exception.txt.twig traces.xml.twig
error.xml.twig exception.xml.twig traces_text.html.twig
Already halted vagrant and upped again, also cleared cache already.
Any ideas?

Related

loading specific lib locally for php composer

I am in the process of setting up Attendize parallel to Wordpress on my webspace,
server details:
Operating System: Linux
Software: Apache/2.4.54 (Unix)
MySQL version: MySQL Community Server (GPL) v5.7.38
PHP Version: 8.0.26
all works fine, except one process with "nitmedia/wkhtml2pdf": "dev-master". when running the function _render() I get
[2023-01-18 05:51:44] production.ERROR: Error generating ticket. This can be due to permissions on vendor/nitmedia/wkhtml2pdf/src/Nitmedia/Wkhtml2pdf/lib. This folder requires write and execute permissions for the web user
[2023-01-18 05:51:44] production.ERROR: Error message. System error /mnt/web516/c1/78/5615478/htdocs/attendize/vendor/nitmedia/wkhtml2pdf/src/Nitmedia/Wkhtml2pdf/lib/wkhtmltopdf-amd64: error while loading shared libraries: libgio-2.0.so.0: cannot open shared object file: No such file or directory
[2023-01-18 05:51:44] production.ERROR: Error stack trace#0 /mnt/web516/c1/78/5615478/htdocs/attendize/vendor/nitmedia/wkhtml2pdf/src/Nitmedia/Wkhtml2pdf/Wkhtml2pdf.php(1047): Nitmedia\Wkhtml2pdf\Wkhtml2pdf->_render()
#1 /mnt/web516/c1/78/5615478/htdocs/attendize/vendor/nitmedia/wkhtml2pdf/src/Nitmedia/Wkhtml2pdf/Wkhtml2pdf.php(243): Nitmedia\Wkhtml2pdf\Wkhtml2pdf->output()`
libgio-2.0.so.0 is missing. , no PDF output of course
since its a rented webspace, I cannot run any packagemananger or write into the root dir.
So I tried to load the missing lib from local file. The acquired .deb got unpacked and x86_64-linux-gnu contained libgmodule-2.0.so.0 which I copy to same dir as composer.json.
in the php.ini I added extension_dir = "./"to load libraries locally from same dir and extension=libgio-2.0.so.0 to load it.
when running composer I get
PHP Warning: PHP Startup: Unable to load dynamic library 'libgio-2.0.so.0' (tried: ./libgio-2.0.so.0 (./libgio-2.0.so.0: cannot open shared object file: No such file or directory), ./libgio-2.0.so.0.so (./libgio-2.0.so.0.so: cannot open shared object file: No such file or directory)) in Unknown on line 0`
if I change the location of the file and the extension_dir accordingly, I keep getting this error.
I have also tried to zip it up and let composer load it from local repository with composer.json, goes thru, but does nothing.
So how (also in what format) can I load this specific lib locally? (via php.ini, or composer integration)

How do I fix the homestead.rb path that is automatically used by vagrant?

I ran the homestead make command successfully.
Afterward, I ran the vagrant up command in the vendor/bin folder, but I get the following error:
Vagrant failed to initialize at a very early stage:
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: C:/xampp/htdocs/all-projects/project1/vendor/bin/Vagrantfile
Line number: 0
Message: LoadError: cannot load such file -- C:/xampp/htdocs/all-projects/project1/vendor/bin/vendor/laravel/homestead/scripts/homestead.rb
The path to homstead.rb is incorrect. Such a path does not exist and the homestead.rb file is in another folder for the project. How do I fix the homestead.rb path that is automatically used by vagrant?
P.S. the /laravel folder is present in the project directory.
You need to edit your Vagrantfile. In there is a line that references homestead.rb. Mine looks like
require File.expand_path(File.dirname(__FILE__) + '/scripts/homestead.rb')
Update this to be the correct path.

Laravel 5.7, preset bootstrap error. Failed to open stream

I'm trying to use the laravel 5.7 bootstrap4 preset, but have problems using it.
Do you guys know why I see this error? Why is the file missing? I have not changed the path to anything.
kgp43:~/workspace (master) $ php artisan preset bootstrap
In Bootstrap.php line 41:
copy(/home/ubuntu/workspace/resources/sass/_variables.scss): failed to open stream: No such file or directory
I found the error.
All folders in the Assets directory has to be moved up one level.
It should not be needed to move the content of the Assets folder (accoring to laravel - but it was for me to run the preset command.
https://laravel.com/docs/5.7/upgrade

Cakephp 3.4.14 Exception: Shell class for "Serve" could not be found

here is my shell snip
Maan#DESKTOP-TNA7PJU MINGW64 /d/xampp1/htdocs/app
$ bin/cake serve
Exception: Shell class for "Serve" could not be found. in [D:\xampp1\htdocs\app\vendor\cakephp\cakephp\src\Console\ShellDispatcher.php, line 327]
Maan#DESKTOP-TNA7PJU MINGW64 /d/xampp1/htdocs/app
$ cd ../pocketpa-git-clone000000/
Maan#DESKTOP-TNA7PJU MINGW64 /d/xampp1/htdocs/pocketpa-git-clone000000 (master)
$ bin/cake serve
Exception: Shell class for "Serve" could not be found. in [D:\xampp1\htdocs\pocketpa-git-clone000000\vendor\cakephp\cakephp\src\Console\ShellDispatcher.php, line 327]
Warning Error: file_put_contents(D:\xampp1\htdocs\pocketpa-git-clone000000\logs\cli-error.log): failed to open stream: No such file or directory in [D:\xampp1\htdocs\pocketpa-git-clone000000\vendor\cakephp\cakephp\src\Log\Engine\FileLog.php, line 133]
PHP Warning: file_put_contents(D:\xampp1\htdocs\pocketpa-git-clone000000\logs\cli-error.log): failed to open stream: No such file or directory in D:\xampp1\htdocs\pocketpa-git-clone000000\vendor\cakephp\cakephp\src\Log\Engine\FileLog.php on line 133
last night i shut down my pc and in morning when i restart i am facing this issue
cakephp version 3.4.14
php 5.6.36
and having this problem when wants to start project
Sorry my bad i was messed up with diffferent projects i was working on Laravel Projects and using frequently
php artisan serve
This command will start a development server at http://localhost:8000:
when i come back to CakePhp Project i was messed up and trying
bin\cake serve
command to start local server for cakephp environment http://localhost:8765/
thats make me so much trouble
But the orignal command to run CakePhp Sever on LocalHost is
bin\cake server
here you can get more details https://book.cakephp.org/3.0/en/installation.html#development-server

Can not find PDOConnection.php

I installed a Laravel project, as I am trying to learn the framework. I am now trying to work on a different machine and I can't set it up.
I get these errors:
blog git:(development) php artisan migrate:install
[ErrorException]
include(/home/ioto/www/my-bitbucket/blog/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php): failed to open stream: No such file or directory
although when I try to check if the file actually exists I can see it but I can't access it:
➜ blog git:(development) cd vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver
➜ Driver git:(development) ls -lisa
total 112
[...]
26740122787838334 4 -rw-rw-rw- 0 777 ioto 3695 sep 10 15:00 PDOConnection.php
[...]
➜ Driver git:(development) cat PDOConnection.php
cat: PDOConnection.php: No such file or directory
I am using "bash on ubuntu on windows"
I get the same errors if I try different things like other artisan commands, if I try to serve the application and so on. I tried a new composer update after deleting the vendor folder. Set chmod to 777, but I'm out of ideas...
Any suggestions on what can I try to debug this ?

Categories