ChrisF79

ChrisF79

Member Since 5 Years Ago

Naples, FL

Experience Points
9,920
Total
Experience

80 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed
120
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

Level 2
9,920 XP
Aug
05
2 months ago
Activity icon

Replied to How To Use A Database On A Remote Server?

The user is chris. That's all.

Activity icon

Replied to How To Use A Database On A Remote Server?

No, I just didn't fill out the thread properly...

Activity icon

Started a new conversation How To Use A Database On A Remote Server?

Hi everyone,

I created a new server to use as a database server. I created a new user using:

CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';

I then gave myself all permissions using:

GRANT ALL PRIVILEGES ON database.table TO 'user'@'localhost';

I can log in from my computer using Sequel Pro. Now, I went into my .env file and made:

DB_CONNECTION=mysql
DB_HOST=50.50.50.50
DB_PORT=3306
DB_DATABASE=RETS
DB_USERNAME=chris
DB_PASSWORD=password

However, I'm getting an access denied error. What could I be doing wrong?

SQLSTATE[HY000] [2002] Connection refused (SQL: select * from `rets_property_res_mstr` where `Status` = Active and `Inactive` = 0 and `featuredlisting` = 1 order by `CurrentPrice` asc limit 20)
Activity icon

Replied to Splitting My App Between Two Servers

Thanks Bobby! As for the database, it would live on the new server so the old server would have to access it remotely. That shouldn't be a problem, right?

Activity icon

Started a new conversation Splitting My App Between Two Servers

I have a real estate website and behind the scenes, the app is going out and downloading every picture for each listing, resizing to multiple sizes and uploading to S3 for storage. There are other CPU intensive tasks as well but that's the big one. It is really slowing my site down so I want to move the database and tasks to a different VPS. My question then is... Can I just git clone my site on the new server and then:

  1. Stop the cron on the first server and start it on the second
  2. Edit my .env to put the IP of the new server as the database host

Anything else? I'm sure there's something I'm missing that will mess something up. Any insight on what to expect or if I'm thinking correctly is highly appreciated!

Jul
23
2 months ago
Activity icon

Replied to Cannot Create A Simple Array

Thank you. I just copy/pasted your code. It runs for about 45 seconds and then prints:

Array
(
)
Activity icon

Started a new conversation Cannot Create A Simple Array

I'm trying to create an array as I loop through some records of my database. The records are there but after the loop when I print_r the $sitemap, it is empty. It should have about 27k records in it.

Here is my code:

        Listing::where('Inactive', '=', 0)
            ->where('Status', '=', 'Active')
            ->chunk(200, function($listings) {
            foreach($listings as $listing) {
                $sitemap[] = array (
                    $cleanURL = "https://listingnaples.com/listing/" . $listing->MLSNumber . "/" . $listing->CleanAddressURL,
                    "loc" => $cleanURL,
                    "changefreq" => "daily",
                    "priority" => "0.90"
                );
            }
        });
Jul
16
3 months ago
Activity icon

Replied to How Do I Diagnose A 500 Server Error?

You did it! I literally just yelled "YES!" out loud without thinking. I was afraid I'd have to hire someone to fix it but your link got it. It ended up being permissions. Even though I was changing them myself per other solutions, your link got it done. I must have been missing something. THANK YOU!

Activity icon

Replied to How Do I Diagnose A 500 Server Error?

I checked storage permissions.

drwxr-xr-x  6 chrisfarrugia www-data   4096 Jun 23 12:04 storage

I checked the laravel.log file itself...

-rwxrwxrwx 1 chrisfarrugia www-data 14021733 Jul 16 09:48 laravel.log

I looked at my controllers and route file and cannot find anythign that looks out of place. Plus, I can't figure out why it works locally with Laravel Valet.

Should I delete everything and just clone the folder again from github?

Is this something I can hire for do you think? I could always post a job on UpWork for someone to help.

Activity icon

Replied to How Do I Diagnose A 500 Server Error?

Found my error log (I'm pretty bad at this!). Here is the log:

019/07/16 09:21:16 [error] 31590#31590: *61261 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught ReflectionException: Class view does not exist in /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Container/Container.php:790
Stack trace:
#0 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(790): ReflectionClass->__construct('view')
#1 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(667): Illuminate\Container\Container->build('view')
#2 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(615): Illuminate\Container\Container->resolve('view', Array)
#3 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(767): Illuminate\Container\Container->make('view', Array)
#4 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(1225): Illuminate\Foundation\Application->make('view')
#5 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Su...PHP message: PHP Fatal error:  Uncaught ReflectionException: Class view does not exist in /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Container/Container.php:790
Jul
15
3 months ago
Activity icon

Replied to How Do I Diagnose A 500 Server Error?

It wasn't on so I just turned it on. However, refreshing the page that gives the error 500 didn't make any new entry to storage/logs/laravel.log

Activity icon

Started a new conversation How Do I Diagnose A 500 Server Error?

Hi friends,

I wrote a sitemap generator and it is working on my local Laravel Valet server. When I put it into production I get an Error 500 server error (running nginx). I look at my storage/logs/laravel.log and nothing is in there regarding the error. How do I diagnose and solve the problem?

Thank you

Jun
27
3 months ago
Activity icon

Replied to Error Log Saying No Query Results Found But There Are Records

That's very helpful and thanks everyone for taking the time out to help me!

Activity icon

Replied to Error Log Saying No Query Results Found But There Are Records

I just emptied the entire Amazon SQS queue and it seems to be working now! Could this error message just be saying, "Hey man... this job you want me to do... the record isn't in that model."

Activity icon

Replied to Error Log Saying No Query Results Found But There Are Records

Rebooting now to see if it fixes it... Just rebooted and it is doing the exact same thing... it's just that error over and over.

Activity icon

Started a new conversation Error Log Saying No Query Results Found But There Are Records

I just don't understand this error. I'm working on an app where I download records from a server and store them in a temporary table called rets_property_res_naples and then in a console command, they get selected, transformed a bit, then put into a "master" table.

I'm now getting the below error and I just don't understand it. If I go into php artisan tinker and do a \App\Models\TempListingNaples::all(), I get all of the records!

Like I said, I just don't understand so why would it pull fine from the model but the console command couldn't?

Error Message

Illuminate\Database\Eloquent\ModelNotFoundException: No query results for model [App\Models\TempListingNaples]. in /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php:454
Stack trace:
#0 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php(85): Illuminate\Database\Eloquent\Builder->firstOrFail()
#1 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Queue/SerializesAndRestoresModelIdentifiers.php(55): App\Jobs\ProcessListing->restoreModel(Object(Illuminate\Contracts\Database\ModelIdentifier))
#2 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Queue/SerializesModels.php(45): App\Jobs\ProcessListing->getRestoredPropertyValue(Object(Illuminate\Contracts\Database\ModelIdentifier))
#3 [internal function]: App\Jobs\ProcessListing->__wakeup()
#4 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(42): unserialize('O:23:"App\Jobs\...')
#5 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(88): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\SqsJob), Array)
#6 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(327): Illuminate\Queue\Jobs\Job->fire()
#7 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(277): Illuminate\Queue\Worker->process('sqs', Object(Illuminate\Queue\Jobs\SqsJob), Object(Illuminate\Queue\WorkerOptions))
#8 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(118): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\SqsJob), 'sqs', Object(Illuminate\Queue\WorkerOptions))
#9 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(102): Illuminate\Queue\Worker->daemon('sqs', 'ImportQueue', Object(Illuminate\Queue\WorkerOptions))
#10 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(86): Illuminate\Queue\Console\WorkCommand->runWorker('sqs', 'ImportQueue')
#11 [internal function]: Illuminate\Queue\Console\WorkCommand->handle()
#12 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(32): call_user_func_array(Array, Array)
#13 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(90): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#14 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(34): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#15 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Container/Container.php(576): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#16 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Console/Command.php(183): Illuminate\Container\Container->call(Array)
#17 /srv/www/listingnaples.com/vendor/symfony/console/Command/Command.php(255): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#18 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Console/Command.php(170): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#19 /srv/www/listingnaples.com/vendor/symfony/console/Application.php(921): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /srv/www/listingnaples.com/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 /srv/www/listingnaples.com/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#22 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Console/Application.php(90): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(133): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /srv/www/listingnaples.com/artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 {main}

Here is the model:

TempListingNaples

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class TempListingNaples extends Model
{
    protected $table = "rets_property_res_naples";
    protected $hidden = ['created_at', 'updated_at'];
    protected $dates = ['PhotoModificationTimestamp'];
    public $board = "Naples";

    public function __construct(array $attributes = [])
    {
        $this->fillable = \Config::get('master_schema');
        parent::__construct($attributes);
    }
    
    function toArray()
    {
        $temp = parent::toArray();
            if(starts_with($temp['PhotoModificationTimestamp'], '-'))
            {
                $temp['PhotoModificationTimestamp'] = '0000-00-00 00:00:00';
            }
        return $temp;
    }
}

Console Command

<?php
namespace App\Console\Commands;

use DB;
use App\Models\Listing;
use App\Models\ListingMigrator;
use App\Models\TempListingNaples;
use App\Models\RetsFeed;
use Illuminate\Console\Command;

class MigrateListings extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'chores:MigrateListings';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Migrate the listings from each boards temp table to rets_property_res_mstr';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        // Turn off query logging
        DB::connection()->disableQueryLog();

        // get each feed so we can assign models
        $feeds = RetsFeed::where('active', '=', 1)->get();

        foreach ($feeds as $feed)
        {

            // Define which model to use based on the feed's board using the fully qualified namespace
            $class = 'App\Models\TempListing' . $feed->board;

            // Get the listings sitting in the temp table for that board
            $listings = $class::orderBy('MatrixModifiedDT','asc')->get();

            $listings->each(function($listing) use ($feed) {
                \App\Jobs\ProcessListing::dispatch($listing, $feed);
            });

        }
    }
}
Jun
24
3 months ago
Activity icon

Replied to Can't Send Mail Through Gmail

SOLVED! It isn't smtp.google.com! It's smtp.gmail.com!

Jun
23
3 months ago
Activity icon

Replied to Can't Send Mail Through Gmail

We're on to something...

[email protected]:/srv/www/listingnaples.com$ ping smtp.google.com:587
ping: smtp.google.com:587: Name or service not known
Activity icon

Replied to Can't Send Mail Through Gmail

    public function store(Request $request)
    {

        // Validate of the form data
        $validateData = $request->validate([
            'firstname'     => 'required',
            'lastname'      => 'required',
            'email'         => 'required|email',
            'phone'         => 'required',
            'address'       => 'required'
        ]);

        $valuation = new Valuation();

        $valuation->firstname = request('firstname');
        $valuation->lastname = request('lastname');
        $valuation->email = request('email');
        $valuation->phone = request('phone');
        $valuation->address = request('address');

        $valuation->save();

        Mail::send('emails.contact', [
            'msg' => 'New Valuation Request',

        ], function($mail) use($request) {
            $mail->from($request->email, $request->firstname. ' ' .$request->lastname);
            $mail->to('[email protected]')->subject('ListingNaples Contact');
        });



        return redirect()->back()->with('flash_message', 'Thank you. We will be in touch shortly.');


    }
Activity icon

Started a new conversation Can't Send Mail Through Gmail

I'm trying to send email through a form and I'm getting the following error:

Swift_TransportException
Connection could not be established with host smtp.google.com [php_network_getaddresses: getaddrinfo failed: Name or service not known #0]

In my environment file, I have:

MAIL_DRIVER=smtp
MAIL_HOST=smtp.google.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=mypassword
MAIL_ENCRYPTION=tls

I've tried everything others have said yet it just won't connect and send.

Jun
12
4 months ago
Activity icon

Replied to Homestead Not Mapping ~/code/ After Updating Box

I should add that I did run vagrant provision.

Activity icon

Started a new conversation Homestead Not Mapping ~/code/ After Updating Box

Hi everyone,

Today I updated the homstead box to 8.0.0-alpha2. It was working all day and then after updating it has an empty ~/code/ folder when I ssh in. On my machine, all of my folders are in ~/code so that's fine. However, they just aren't there when I ssh into the box.

Did something change in version 8 and nobody is telling me?

Jun
04
4 months ago
Activity icon

Replied to Homestead, Serve, Separate Linux Box/VM? How Do You Work?

@CRONIX - Ah, I'm a Mac guy and I have 16GB of Ram. I did think about that but I just figured something like Parallels would be faster than VirtualBox.

Activity icon

Replied to Homestead, Serve, Separate Linux Box/VM? How Do You Work?

No, not at all. But hitting refresh on a page just takes longer than it should. When working on the front-end, it gets a bit tedious.

Activity icon

Started a new conversation Homestead, Serve, Separate Linux Box/VM? How Do You Work?

I have always used Homestead but I'm getting a bit tired of how slow it is. I'm tempted to just create an Ubuntu VM with Parallels and use that as my dev environment.

What do you use to serve?

May
03
5 months ago
Activity icon

Replied to Search Not Appending To URL Using GET

WOW, thank you! I told you it was a stupid question! Now if only there were a way to delete threads.

Activity icon

Started a new conversation Search Not Appending To URL Using GET

I have the code below (looks like a lot but it's not) and when I make choices in the form and hit submit, it appends /listings/?search%5B%5D= but it does not put any values at all in the URL. It seems so ridiculous but I have no idea why it is doing that.

How do I get my form to actually put the values in the URL?

Thanks!

<!-- Hero -->
<section id="hero">
<div class="container">
<div class="col-md-12 mx-auto">

    <form method="get" action="listings/" id="searchForm">
      <div class="form-row">
        <div class="col">
            <!-- Minimum Price -->
            <select class="form-control mb-2" id="MinPrice">
                <option value="">Minimum Price</option>
                <option value="50000">,000</option>
                <option value="75000">,000</option>
                <option value="100000">0,000</option>
                <option value="125000">5,000</option>
                <option value="150000">0,000</option>
                <option value="175000">5,000</option>
                <option value="200000">0,000</option>
                <option value="225000">5,000</option>
                <option value="250000">0,000</option>
                <option value="275000">5,000</option>
                <option value="300000">0,000</option>
                <option value="325000">5,000</option>
                <option value="350000">0,000</option>
                <option value="375000">5,000</option>
                <option value="400000">0,000</option>
                <option value="425000">5,000</option>
                <option value="450000">0,000</option>
                <option value="475000">5,000</option>
                <option value="500000">0,000</option>
                <option value="550000">0,000</option>
                <option value="600000">0,000</option>
                <option value="650000">0,000</option>
                <option value="700000">0,000</option>
                <option value="750000">0,000</option>
                <option value="800000">0,000</option>
                <option value="850000">0,000</option>
                <option value="900000">0,000</option>
                <option value="950000">0,000</option>
                <option value="1000000">,000,000</option>
                <option value="1100000">,100,000</option>
                <option value="1200000">,200,000</option>
                <option value="1300000">,300,000</option>
                <option value="1400000">,400,000</option>
                <option value="1500000">,500,000</option>
                <option value="1600000">,600,000</option>
                <option value="1700000">,700,000</option>
                <option value="1800000">,800,000</option>
                <option value="1900000">,900,000</option>
                <option value="2000000">,000,000</option>
                <option value="2100000">,100,000</option>
                <option value="2200000">,200,000</option>
                <option value="2300000">,300,000</option>
                <option value="2400000">,400,000</option>
                <option value="2500000">,500,000</option>
                <option value="2750000">,750,000</option>
                <option value="3000000">,000,000</option>
                <option value="3250000">,250,000</option>
                <option value="3500000">,500,000</option>
                <option value="3750000">,750,000</option>
                <option value="4000000">,000,000</option>
                <option value="4250000">,250,000</option>
                <option value="4500000">,500,000</option>
                <option value="4750000">,750,000</option>
                <option value="5000000">,000,000</option>
                <option value="5250000">,250,000</option>
                <option value="5500000">,500,000</option>
                <option value="5750000">,750,000</option>
                <option value="6000000">,000,000</option>
                <option value="6250000">,250,000</option>
                <option value="6500000">,500,000</option>
                <option value="6750000">,750,000</option>
                <option value="7000000">,000,000</option>
                <option value="7250000">,250,000</option>
                <option value="7500000">,500,000</option>
                <option value="7750000">,750,000</option>
                <option value="8000000">,000,000</option>
                <option value="8250000">,250,000</option>
                <option value="8500000">,500,000</option>
                <option value="8750000">,750,000</option>
                <option value="9000000">,000,000</option>
                <option value="9250000">,250,000</option>
                <option value="9500000">,500,000</option>
                <option value="9750000">,750,000</option>
                <option value="10000000">,000,000</option>
            </select>
        </div>



        <div class="col">
            <select class="form-control mb-2" id="MinPrice">
                <option value="">Maximum Price</option>
                <option value="50000">,000</option>
                <option value="75000">,000</option>
                <option value="100000">0,000</option>
                <option value="125000">5,000</option>
                <option value="150000">0,000</option>
                <option value="175000">5,000</option>
                <option value="200000">0,000</option>
                <option value="225000">5,000</option>
                <option value="250000">0,000</option>
                <option value="275000">5,000</option>
                <option value="300000">0,000</option>
                <option value="325000">5,000</option>
                <option value="350000">0,000</option>
                <option value="375000">5,000</option>
                <option value="400000">0,000</option>
                <option value="425000">5,000</option>
                <option value="450000">0,000</option>
                <option value="475000">5,000</option>
                <option value="500000">0,000</option>
                <option value="550000">0,000</option>
                <option value="600000">0,000</option>
                <option value="650000">0,000</option>
                <option value="700000">0,000</option>
                <option value="750000">0,000</option>
                <option value="800000">0,000</option>
                <option value="850000">0,000</option>
                <option value="900000">0,000</option>
                <option value="950000">0,000</option>
                <option value="1000000">,000,000</option>
                <option value="1100000">,100,000</option>
                <option value="1200000">,200,000</option>
                <option value="1300000">,300,000</option>
                <option value="1400000">,400,000</option>
                <option value="1500000">,500,000</option>
                <option value="1600000">,600,000</option>
                <option value="1700000">,700,000</option>
                <option value="1800000">,800,000</option>
                <option value="1900000">,900,000</option>
                <option value="2000000">,000,000</option>
                <option value="2100000">,100,000</option>
                <option value="2200000">,200,000</option>
                <option value="2300000">,300,000</option>
                <option value="2400000">,400,000</option>
                <option value="2500000">,500,000</option>
                <option value="2750000">,750,000</option>
                <option value="3000000">,000,000</option>
                <option value="3250000">,250,000</option>
                <option value="3500000">,500,000</option>
                <option value="3750000">,750,000</option>
                <option value="4000000">,000,000</option>
                <option value="4250000">,250,000</option>
                <option value="4500000">,500,000</option>
                <option value="4750000">,750,000</option>
                <option value="5000000">,000,000</option>
                <option value="5250000">,250,000</option>
                <option value="5500000">,500,000</option>
                <option value="5750000">,750,000</option>
                <option value="6000000">,000,000</option>
                <option value="6250000">,250,000</option>
                <option value="6500000">,500,000</option>
                <option value="6750000">,750,000</option>
                <option value="7000000">,000,000</option>
                <option value="7250000">,250,000</option>
                <option value="7500000">,500,000</option>
                <option value="7750000">,750,000</option>
                <option value="8000000">,000,000</option>
                <option value="8250000">,250,000</option>
                <option value="8500000">,500,000</option>
                <option value="8750000">,750,000</option>
                <option value="9000000">,000,000</option>
                <option value="9250000">,250,000</option>
                <option value="9500000">,500,000</option>
                <option value="9750000">,750,000</option>
                <option value="10000000">,000,000</option>
            </select>
          </div> <!-- end col -->
    </div><!-- End Row -->

    <div class="form-row">
          <div class="col">
            <select class="form-control mb-2" id="bedrooms">
                <option value="">Minimum Bedrooms</option>
                <option value="0">Studio</option>
                <option value="1">1 Bedroom</option>
                <option value="2">2 Bedrooms</option>
                <option value="3">3 Bedrooms</option>
                <option value="4">4 Bedrooms</option>
                <option value="5">5 Bedrooms</option>
                <option value="6">6 or More Bedrooms</option>
            </select>
          </div>

      <div class="col">
            <select class="form-control mb-2" id="bathrooms">
                <option value="">Minimum Bathrooms</option>
                <option value="1">1 Bathrooms</option>
                <option value="2">2 Bathrooms</option>
                <option value="3">3 Bathrooms</option>
                <option value="4">4 Bathrooms</option>
                <option value="5">5 Bathrooms</option>
                <option value="6">6 or More Bathrooms</option>
            </select>
          </div>

    </div> <!-- End row 2 -->


    <div class="form-row">
          <div class="col">
            <select class="form-control mb-2" id="bedrooms">
                <option value="">Minimum Square Feet</option>
                <option value="1000">1,000+</option>
                <option value="1250">1,250+</option>
                <option value="1500">1,500+</option>
                <option value="1750">1,750+</option>
                <option value="2000">2,000+</option>
                <option value="2500">2,500+</option>
                <option value="3000">3,000+</option>
                <option value="4000">4,000+</option>
                <option value="5000">5,000+</option>
                <option value="6000">6,000+</option>
            </select>
          </div>

      <div class="col">
        <button type="submit" id="search" name="search[]" class="listingbutton btn w-100"><i class="fas fa-home mr-2"></i>Find My Home</a></button>
      </div>

    </div> <!-- End row 3 -->

</form>
</section>
Apr
21
5 months ago
Activity icon

Started a new conversation DB Update Not Working - Non-static Method Illuminate\Database\Eloquent\Model::update() Should Not Be Called Statically

I'm running a simple script to count pageviews. It pulls the pageviews, increments the number, then tries to update the record. However, I'm getting the error in the subject line.

        $views = wp_popularpostsdata::where('postid', '=', $data[0]['id'])->first()->toArray();
        $newviews = $views['pageviews']+1;
        $postid = $views['postid'];

        $query = "update wp_popularpostsdata set pageviews = '$newviews' where postid = $postid";
        $newviews = wp_popularpostsdata::update($query);

        return view('layouts.blog')->withData($data);

I'm embarrassed at how easy this should be but I'm stuck!

Apr
18
6 months ago
Activity icon

Replied to How Do I Output A JSON Variable?

$post->_embedded->author['0']->name

Activity icon

Started a new conversation How Do I Output A JSON Variable?

I have the JSON below. All I am trying to do is output "Theme Reviewer" as the author name. I tried

$post->_embedded['author']['0']['name']

That doesn't output it. I've tried other variations like the 0 not having ' around it yet nothing is working. Please help!

The variable is at the end of this JSON:

array:10 [▼
  0 => {#710 ▼
    +"id": 1780
    +"date": "2018-11-03T12:20:00"
    +"date_gmt": "2018-11-03T12:20:00"
    +"guid": {#711 ▶}
    +"modified": "2019-04-19T01:02:23"
    +"modified_gmt": "2019-04-19T01:02:23"
    +"slug": "block-image"
    +"status": "publish"
    +"type": "post"
    +"link": "https://blog.listingnaples.com/block-image/"
    +"title": {#712 ▶}
    +"content": {#713 ▶}
    +"excerpt": {#714 ▶}
    +"author": 3
    +"featured_media": 1022
    +"comment_status": "open"
    +"ping_status": "open"
    +"sticky": false
    +"template": ""
    +"format": "standard"
    +"meta": {#715 ▶}
    +"categories": array:1 [▶]
    +"tags": array:1 [▶]
    +"fimg_url": "https://blog.listingnaples.com/wp-content/uploads/2013/03/featured-image-horizontal-1.jpg"
    +"_links": {#717 ▶}
    +"_embedded": {#734 ▼
      +"author": array:1 [▼
        0 => {#729 ▼
          +"id": 3
          +"name": "Theme Reviewer"
Mar
27
6 months ago
Activity icon

Replied to Php Artisan Now Throwing A PHP Fatal Error On Laravel 5.7.26

Good call. Evidently my php was updated from 7.2-fpm to 7.3-fpm so I had to go in and change that, composer update and we're back in business. Thanks!

Activity icon

Replied to Php Artisan Now Throwing A PHP Fatal Error On Laravel 5.7.26

I should add that I did make sure bcmath is installed...

php7.2-bcmath is already the newest version (7.2.16-1+ubuntu18.04.1+deb.sury.org+1).
Activity icon

Started a new conversation Php Artisan Now Throwing A PHP Fatal Error On Laravel 5.7.26

Hi everyone,

I woke up today to an odd issue. Running php artisan by itself even will throw this:

PHP Fatal error:  Uncaught Error: Call to undefined function Moontoast\Math\bcadd() in /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php:506
Stack trace:
#0 /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php(62): Moontoast\Math\BigNumber->setValue('155368742548353')
#1 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php(49): Moontoast\Math\BigNumber->__construct('155368742548353')
#2 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/Generator/CombGenerator.php(72): Ramsey\Uuid\Converter\Number\BigNumberConverter->toHex('155368742548353')
#3 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/UuidFactory.php(235): Ramsey\Uuid\Generator\CombGenerator->generate(16)
#4 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Support/Str.php(552): Ramsey\Uuid\UuidFactory->uuid4()
#5 /srv/www/listingnaples.com/vendor/laravel/telescope/src/IncomingEntry.php(74): Illuminate\Support\Str::orderedUuid()
#6 /srv/www/listingnaples.c in /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php on line 506
PHP Fatal error:  Uncaught Error: Call to undefined function Moontoast\Math\bcadd() in /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php:506
Stack trace:
#0 /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php(62): Moontoast\Math\BigNumber->setValue('155368742548506')
#1 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php(49): Moontoast\Math\BigNumber->__construct('155368742548506')
#2 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/Generator/CombGenerator.php(72): Ramsey\Uuid\Converter\Number\BigNumberConverter->toHex('155368742548506')
#3 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/UuidFactory.php(235): Ramsey\Uuid\Generator\CombGenerator->generate(16)
#4 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Support/Str.php(552): Ramsey\Uuid\UuidFactory->uuid4()
#5 /srv/www/listingnaples.com/vendor/laravel/telescope/src/IncomingEntry.php(74): Illuminate\Support\Str::orderedUuid()
#6 /srv/www/listingnaples.c in /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php on line 506
[email protected]:/srv/www/listingnaples.com$ php artisan --version
 Laravel Framework 5.7.26
PHP Fatal error:  Uncaught Error: Call to undefined function Moontoast\Math\bcadd() in /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php:506
Stack trace:
#0 /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php(62): Moontoast\Math\BigNumber->setValue('155368753468842')
#1 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php(49): Moontoast\Math\BigNumber->__construct('155368753468842')
#2 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/Generator/CombGenerator.php(72): Ramsey\Uuid\Converter\Number\BigNumberConverter->toHex('155368753468842')
#3 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/UuidFactory.php(235): Ramsey\Uuid\Generator\CombGenerator->generate(16)
#4 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Support/Str.php(552): Ramsey\Uuid\UuidFactory->uuid4()
#5 /srv/www/listingnaples.com/vendor/laravel/telescope/src/IncomingEntry.php(74): Illuminate\Support\Str::orderedUuid()
#6 /srv/www/listingnaples.c in /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php on line 506
PHP Fatal error:  Uncaught Error: Call to undefined function Moontoast\Math\bcadd() in /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php:506
Stack trace:
#0 /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php(62): Moontoast\Math\BigNumber->setValue('155368753468927')
#1 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php(49): Moontoast\Math\BigNumber->__construct('155368753468927')
#2 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/Generator/CombGenerator.php(72): Ramsey\Uuid\Converter\Number\BigNumberConverter->toHex('155368753468927')
#3 /srv/www/listingnaples.com/vendor/ramsey/uuid/src/UuidFactory.php(235): Ramsey\Uuid\Generator\CombGenerator->generate(16)
#4 /srv/www/listingnaples.com/vendor/laravel/framework/src/Illuminate/Support/Str.php(552): Ramsey\Uuid\UuidFactory->uuid4()
#5 /srv/www/listingnaples.com/vendor/laravel/telescope/src/IncomingEntry.php(74): Illuminate\Support\Str::orderedUuid()
#6 /srv/www/listingnaples.c in /srv/www/listingnaples.com/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php on line 506

The problem is, I really have no idea how to solve it! It is a dependency issue, no?

Feb
06
8 months ago
Activity icon

Replied to Whoops Isn't Working... Whoops!

I took the easy way out and just removed filp/whoops and reinstalled it. That fixed it. I wish I could delete topics here because I created this one and my wife created one as well so now we have duplicate conversations going!

At any rate, problem solved!

Activity icon

Replied to Could Not Find Resource 'css/whoops.base.css' And Freezing

I took the easy way out and just removed filp/whoops and reinstalled it. That fixed it. I wish I could delete topics here because I created this one and my wife created one as well so now we have duplicate conversations going!

At any rate, problem solved!

Activity icon

Replied to Whoops Isn't Working... Whoops!

Doing php artisan serve on the same project gives me the same error so I think we can eliminate homestead as being a problem.

Activity icon

Replied to Could Not Find Resource 'css/whoops.base.css' And Freezing

By the way, it isn't a homestead issue. Doing php artisan serve gives me the exact same problem.

Activity icon

Replied to Whoops Isn't Working... Whoops!

I woke up today to a new version of Laravel Homestead and really thought that was going to fix it but it did not unfortunately.

Activity icon

Replied to Whoops Isn't Working... Whoops!

@MUNAZZIL - Tried that as well and it still returns the error.

Feb
05
8 months ago
Activity icon

Replied to Whoops Isn't Working... Whoops!

@JLRDW - Tried both but still the same issue.

Activity icon

Started a new conversation Whoops Isn't Working... Whoops!

I have a page that isn't quite right so when I run it and it tries to output the error I get:

(1/1) RuntimeException Could not find resource 'css/whoops.base.css' in any resource paths.(searched: /home/vagrant/code/listingnaples.test/vendor/filp/whoops/src/Whoops/Handler/../Resources)

in PrettyPageHandler.php line 620
at PrettyPageHandler->getResource('css/whoops.base.css')
in PrettyPageHandler.php line 170
at PrettyPageHandler->handle(object(ErrorException))
in Run.php line 272
at Run->handleException(object(ErrorException))
in Handler.php line 339
at Handler->renderExceptionWithWhoops(object(ErrorException))
in Handler.php line 318
at Handler->renderExceptionContent(object(ErrorException))
in Handler.php line 302
at Handler->convertExceptionToResponse(object(ErrorException))
in Handler.php line 281
at Handler->prepareResponse(object(Request), object(ErrorException))
in Handler.php line 188
at Handler->render(object(Request), object(ErrorException))
in Handler.php line 49
at Handler->render(object(Request), object(ErrorException))
in Pipeline.php line 83
at Pipeline->handleException(object(Request), object(ErrorException))
in Pipeline.php line 32
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in VerifyCsrfToken.php line 75
at VerifyCsrfToken->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in StartSession.php line 63
at StartSession->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in AddQueuedCookiesToResponse.php line 37
at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in EncryptCookies.php line 66
at EncryptCookies->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in Pipeline.php line 104
at Pipeline->then(object(Closure))
in Router.php line 684
at Router->runRouteWithinStack(object(Route), object(Request))
in Router.php line 659
at Router->runRoute(object(Request), object(Route))
in Router.php line 625
at Router->dispatchToRoute(object(Request))
in Router.php line 614
at Router->dispatch(object(Request))
in Kernel.php line 176
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
in Pipeline.php line 30
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in TrustProxies.php line 57
at TrustProxies->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in TransformsRequest.php line 31
at TransformsRequest->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in TransformsRequest.php line 31
at TransformsRequest->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in ValidatePostSize.php line 27
at ValidatePostSize->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in CheckForMaintenanceMode.php line 62
at CheckForMaintenanceMode->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in Pipeline.php line 104
at Pipeline->then(object(Closure))
in Kernel.php line 151
at Kernel->sendRequestThroughRouter(object(Request))
in Kernel.php line 116
at Kernel->handle(object(Request))
in index.php line 55
Activity icon

Replied to Could Not Find Resource 'css/whoops.base.css' And Freezing

@DALMA - Thanks. I did that earlier and it is there and populated. It's that var_dump that's definitely causing the error.

Activity icon

Replied to Could Not Find Resource 'css/whoops.base.css' And Freezing

I just cleared out my laravel.log and ran it. It has right at the top:

[2019-02-05 15:07:30] local.ERROR: Undefined variable: page {"exception":"[object] (ErrorException(code: 0): Undefined variable: page at /home/vagrant/code/listingnaples.test/app/Http/Controllers/PostController.php:24)
[stacktrace]
#0 /home/vagrant/code/listingnaples.test/app/Http/Controllers/PostController.php(24): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Undefined varia...', '/home/vagrant/c...', 24, Array)
#1 [internal function]: App\Http\Controllers\PostController->index()
Activity icon

Replied to Could Not Find Resource 'css/whoops.base.css' And Freezing

@DALMA - Yes, unfortunately. I just ran it again too.

Activity icon

Started a new conversation Could Not Find Resource 'css/whoops.base.css' And Freezing

Hi everyone,

I just installed ButterCMS and put in my controlelr the following code:

    public function index()
    {
        
        $apiToken = 'eaad2fa1cd822fdas234tgsaq7184f25ec6af5';

        $client = new \ButterCMS($apiToken);

        var_dump($client->fetchPosts([
            'page' => $page,
            'page_size' => 10
          ]));

    die();
    }

I've namespaced it at the top of the file with use ButterCMS\ButterCMS;

Now, that code is their example code so I can see that it is working. Yet, it just isn't. Instead, I get this:


(1/1) RuntimeException
Could not find resource 'css/whoops.base.css' in any resource paths.(searched: /home/vagrant/code/listingnaples.test/vendor/filp/whoops/src/Whoops/Handler/../Resources)

in PrettyPageHandler.php line 620
at PrettyPageHandler->getResource('css/whoops.base.css')
in PrettyPageHandler.php line 170
at PrettyPageHandler->handle(object(FatalThrowableError))
in Run.php line 272
at Run->handleException(object(FatalThrowableError))
in Handler.php line 339
at Handler->renderExceptionWithWhoops(object(FatalThrowableError))
in Handler.php line 318
at Handler->renderExceptionContent(object(FatalThrowableError))
in Handler.php line 302
at Handler->convertExceptionToResponse(object(FatalThrowableError))
in Handler.php line 281
at Handler->prepareResponse(object(Request), object(FatalThrowableError))
in Handler.php line 188
at Handler->render(object(Request), object(FatalThrowableError))
in Handler.php line 49
at Handler->render(object(Request), object(FatalThrowableError))
in Pipeline.php line 83
at Pipeline->handleException(object(Request), object(FatalThrowableError))
in Pipeline.php line 34
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in SubstituteBindings.php line 41
at SubstituteBindings->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in VerifyCsrfToken.php line 75
at VerifyCsrfToken->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in ShareErrorsFromSession.php line 49
at ShareErrorsFromSession->handle(object(Request), object(Closure))
in Pipeline.php line 151
at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request))
in StartSession.php line 63

Where in the world did that come from? Any idea what could be going wrong here?

Jan
23
8 months ago
Activity icon

Replied to 502 Bad Gateway On Old And Fresh Install Of Homestead

@TRAVIS.ELKINS - 100% the right answer! We still don't know why after reading the bug report but your help was SO valuable. Thank you so much!

Two things: 1.) I did not realize I could put php: "7.2" in my Homestead.yaml file which is awesome to know.

2.) That fixed it.

Jan
22
8 months ago
Activity icon

Replied to 502 Bad Gateway On Old And Fresh Install Of Homestead

Just checked my wordpress.test-error.log and find this:

2019/01/23 02:41:01 [error] 20363#20363: *6 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.10.1, server: wordpress.test, request: "GET /wp-admin/setup-config.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.3-fpm.sock:", host: "wordpress.test"

Still, not sure how to fix it.

Activity icon

Started a new conversation 502 Bad Gateway On Old And Fresh Install Of Homestead

I followed the 5.7 docs to a T on installing Homestead.

Homestead.yaml

ip: "192.168.10.10"
memory: 1048
cpus: 3
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/code
      to: /home/vagrant/code

sites:
    - map: wordpress.test
      to: /home/vagrant/code/wordpress.test

databases:
    - homestead

** /etc/hosts **

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
192.168.10.10 wordpress.test

255.255.255.255 broadcasthost
::1             localhost

I can ping wordpress.test just fine and I can SSH into the Vagrant box and go straight to the wordpress.test folder under /home/vagrant/code/wordpress.test

However, when I go into my browser and go to http://wordpress.test I get:

502 Bad Gateway

nginx/1.15.6

Wordpress tries to redirect it to:

http://wordpress.test/wp-admin/setup-config.php

since it is a new installation. It just doesn't make sense.

sites-enabled/wordpress.test/

server {
    listen 80;
    listen 443 ssl http2;
    server_name .wordpress.test;
    root "/home/vagrant/code/wordpress.test";

    index index.html index.htm index.php;

    charset utf-8;



    location / {
        try_files $uri $uri/ /index.php?$query_string;

    }



    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    access_log off;
    error_log  /var/log/nginx/wordpress.test-error.log error;

    sendfile off;

    client_max_body_size 100m;

    location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;


        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
    }

    location ~ /\.ht {
        deny all;
    }

    ssl_certificate     /etc/nginx/ssl/wordpress.test.crt;
    ssl_certificate_key /etc/nginx/ssl/wordpress.test.key;
}

The /var/run/php/php7.3-fpm.sock does exist. I have no idea what's wrong.

Jan
09
9 months ago
Activity icon

Replied to Layout File In A Subdirectory?

Sorry, why is that? Which is the preferred way?