Jump to content
LostKobrakai

Laravel Valet with ProcessWire

Recommended Posts

Valet does not use apache, so it‘s certainly no .htaccess issue. The routing is encoded in the drivers (hence the need for drivers in the first place). I‘m no longer actively using the driver, but it can certainly be that there are edge-cases, which won‘t properly resolve using it.

Share this post


Link to post
Share on other sites

I think I tested valet with processwire a couple of years ago and i think I remember it working very well... except all things .htaccess which depends on the drivers. I did not really research it a lot. 

 

Share this post


Link to post
Share on other sites

Ok, thanks anyway. I think it might have something to do with is_file(). I have worked around it for now 🙂 

Share this post


Link to post
Share on other sites

A couple of days ago, I had an issue with Valet on Linux and Tracy. Tracy bar was not loading, giving me an error saying $_SERVER['REQUEST_URI'] was returning a boolean when expected was a string.  

I solved this by 'brute force' like below but would like to understand the reasons for that. Does anybody know?

//ProcessWireValetDriver.php
$_SERVER['REQUEST_URI'] = substr(str_replace($dir, '', $_SERVER['REQUEST_URI']), 10);

			//brute force
            if(!$_SERVER['REQUEST_URI']) {

                $_SERVER['REQUEST_URI'] = "/";

            }
....

 

Share this post


Link to post
Share on other sites

Thanks, Rudy! Glad to know it wasn't just me and my setup 😅

Share this post


Link to post
Share on other sites

@Sergio @adrian I think I found the issue. On current `ProcessWireValetDriver.php` please comment out line 59 (That's what causing the bool return)

See screenshot.625959013_ScreenShot2019-03-22at9_33_32AM.thumb.png.09daef51cd642e6508f16e19ac789c9c.png

 

  • Like 2

Share this post


Link to post
Share on other sites

I've just installed Valet and have been testing sites running a few different CMSs including PW, Craft and ExpressionEngine.

The sites on Craft and EE work fine, but for one of the PW sites I created, I get the home page on every URL I visit, and the other, the home page works OK, but every other page gives me a 'The page isn’t redirecting properly' error. Actually, it's every other PW page, i.e. one ending with a /

If I try and visit a non-existent page like example.html, I get the 404 page for the site.

Is there something else that needs to be done to PW sites to get them to work with Valet?

Edited by Tyssen
Added some more info

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...