Category : linux

I am trying to display my logs on my website to verified users in Laravel based on my role based access control. $file = fopen("/var/log/auth.log", "r") or die(); $content = fread($file, filesize("/var/log/auth.log")); fclose($file); This hits me with an error: fopen(/var/log/auth.log): failed to open stream: Permission denied I can see that Laravel does not have the ..

Read more

I have a working Laravel application running on CentOS 7. After cloning the application whenever it tries to connect to the database the logs shows production.ERROR: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client Besides cloning the application, I also cloned the database so I’ve also tried pointing the cloned application to ..

Read more

I’m having some problems with installing my app on vps server with ssh2_connection. I have created library to configure and automatically install laravel project on any vps (apache, mariadb, mysql, php, phpmyadmin..), but now I have one last problem, running php artisan like cd /var/www && php arisan key:generate, and every time it says like: ..

Read more

DB::table(‘customers as cc’)-> select("cc.id","cc.name","cc.gender","cc.email","cc.mobile","cc.zipcode","cc.hobby","cc.weight","cd.mothertongue","cd.religion","cd.caste","cd.fathername","cd.mothername","cd.brother","cd.sister","cd.brother_married","cd.sister_married","cd.marital_status","cd.dosh","cd.family_status","cd.family_type","cd.family_values","cd.height","cd.occupation","cd.annual_income","cd.country_code","cc.body_type","cc.address","cc.state as state_id","cc.city as city_id","ff.filepath","ct.name as city","cs.name as state","cp.from_age as pre_from_age","cp.to_age as pre_to_age","cp.marital_status as pre_marital_status","cp.have_children as pre_have_children","cp.from_height as pre_from_height","cp.to_hright as pre_to_hright","cp.physical_status as pre_physical_status","cp.eating_habits as pre_eating_habits","cp.drinking_habits as pre_drinking_habits","cp.smoking_habits as pre_smoking_habits","cp.religion as pre_religion","cp.mother_tongue as pre_mother_tongue","cp.cast as pre_cast","cp.dosh as pre_dosh","cp.star as pre_star","cp.education as pre_education","cp.employed_in as pre_employed_in","cp.occupation as pre_occupation","cp.annual_income as pre_annual_income","cp.country as pre_country","cp.residing_state as pre_residing_state","cp.citizenship as ..

Read more

I’ve been trying to get a laravel project going for the past 3 hours. I’m using Ubuntu 20.04.1 LTS and I’ve followed every guide possible to get this running. When I use ./laravel create new blog I get the following error. PHP Warning: require(/home/alex/.config/composer/vendor/laravel/installer/../vendor/autoload.php): failed to open stream: No such file or directory in /home/alex/.config/composer/vendor/laravel/installer/laravel ..

Read more

When I am working on my Ubuntu post url does exist in $request object. While I’m on MAC it’s fine, post url ("/affliates/register" => null) doesn’t exist here. dd($request->all()); Output: array:7 [▼ "_token" => "rTFx0TrFL9bmstDEOTkTxX1FX1zO0OUzFTdxtUjH" "name" => "Hizbul" "password" => "12345678" "password_confirmation" => "12345678" "/affliates/register" => null ] What could be the reason? How can ..

Read more

I got 3 curl calls in my laravel code $fullNode = new IEXBaseTronAPIProviderHttpProvider(‘http://127.0.0.1:8090’); $solidityNode = new IEXBaseTronAPIProviderHttpProvider(‘http://127.0.0.1:8091’); $client = new EOSPHPEOSClient(‘http://127.0.0.1:8888’); $fullNode and $solidityNode work without any problem. $client gets the following error message: cURL error 7: Failed to connect to 127.0.0.1 port 8888: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) I checked this on my nginx machine: ..

Read more

I have the following package installed: https://github.com/OmkarPathak/pyresparser When the script is run from terminal using the command: pyresparser -f /var/www/project/public/uploads/resumes/test2.pdf it works perfectly. However when trying to run the script via Laravel using symfony process it fails. Part of my controller looks like this: $script = public_path(‘python/test.py’); $process = new Process("python3 ".$script); $process->run(); if (!$process->isSuccessful()) ..

Read more

I got an error log on my laravel, with the following error: production.ERROR: ReportCode:b6d6409159f16d3d1c6ac8059ffcfa77 Message:Connection timed out [tcp://192.168.0.18:6379] Trace:#0 /var/www/html/moladin-api/vendor/predis/predis/src/Connection/StreamConnection.php(128): PredisConnectionAbstractConnection->onConnectionError(‘Connection time…’, 110) #1 /var/www/html/moladin-api/vendor/predis/predis/src/Connection/StreamConnection.php(178): PredisConnectionStreamConnection->createStreamSocket(Object(PredisConnectionParameters), ‘tcp://192.168.0….’, 4) #2 /var/www/html/moladin-api/vendor/predis/predis/src/Connection/StreamConnection.php(100): PredisConnectionStreamConnection->tcpStreamInitializer(Object(PredisConnectionParameters)) Even though the redis service on the 192.168.0.18 server is running well and no errors are found. [email protected]:~# systemctl status redis ● redis-server.service – ..

Read more

I’m getting this title error. I just try to adjust PUID and PGID like this. Dockerfile FROM php:7-fpm RUN apt-get update RUN apt-get install -y libmcrypt-dev mariadb-client mcrypt git curl gnupg RUN curl -sL https://deb.nodesource.com/setup_8.x | bash RUN apt-get install -y nodejs RUN docker-php-ext-install pdo_mysql RUN apt-get install -y vim RUN curl -sS https://getcomposer.org/installer | ..

Read more