'Laravel 503 at index.php

I have an install of Laravel running in sail, a mate has the same project (Laravel 9) and it runs fine on his system but on mine I get a 503. The error is occurring at this point in the index.php file…

$kernel = $app->make(Kernel::class);
$response = $kernel->handle(
    $request = Request::capture()
)->send();

I can successfully dd before this block but it falls over with a 503 if I move the dd to be after it.

Can I also add that I have other development sites that run fine on my machine.

Any help on where to look would be greatly appreciated.

Gary



Solution 1:[1]

I've managed to get this working by moving he project to an external drive that is configured to be case sensitive.

Solution 2:[2]

As stated in the first comment, Application.Transpose has a limitation of 65,536 array rows. Please, try the next function able to transpose without such a limitation:

Function TranspKeys(arrK) As Variant
   Dim arr, i As Long
   ReDim arr(1 To UBound(arrK) + 1, 1 To 1)
   For i = 0 To UBound(arrK)
        arr(i + 1, 1) = arrK(i)
   Next i
   TranspKeys = arr
End Function

After copying the functionin the same module where your existing code exists, only modify it as:

Range("A7").Resize(.Count,1) = TranspKeys(.keys)

Solution 3:[3]

Unique Values Case-Sensitive

  • Transpose has its limitations and is best avoided (what's a few more lines).
Option Explicit

Sub DictWith()
    
    With Worksheets(4)
        
        Dim LastRow As Long: LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
        If LastRow < 7 Then Exit Sub
        
        With .Range("A7:A" & LastRow)
            
            Dim Data As Variant
            
            If .Rows.Count = 1 Then
                ReDim Data(1 To 1, 1 To 1)
                Data(1, 1).Value = .Value
            Else
                Data = .Value
            End If
            
            With CreateObject("Scripting.Dictionary")
                
                .CompareMode = vbBinaryCompare
                
                Dim Key As Variant
                Dim r As Long
                
                For r = 1 To UBound(Data, 1)
                    Key = Data(r, 1)
                    If Not IsError(Key) Then
                        If Len(Key) > 0 Then
                            .Item(Key) = Empty
                        End If
                    End If
                Next r
                
                Dim rCount As Long: rCount = .Count
                If rCount = 0 Then Exit Sub
                
                ReDim Data(1 To rCount, 1 To 1)
                r = 0
                
                For Each Key In .Keys
                    r = r + 1
                    Data(r, 1) = Key
                Next Key
                
            End With
            
            .Resize(rCount).Value = Data
            .Resize(.Worksheet.Rows.Count - .Row - rCount + 1) _
                .Offset(rCount).ClearContents ' clear below
        
        End With
    
    End With

End Sub

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ryan M
Solution 2 FaneDuru
Solution 3 VBasic2008