seankobuk Posted June 30, 2014 Share Posted June 30, 2014 I've never had issues getting things up and running on a pc but we recently switched to MAC at work and our resident Process Wire guy also left the company so I am left to my own devices to work this out. I am able to run other php based projects locally with no trouble so it is probably not a generic php mysql issue. I am mostly a css/html guy and not a PHP guru so I am stuck at this point.So far I have... 1. Created local database and filled in info on my config.local.php 2. Created hosts and vhosts entries When I go to my local url I get a bunch of errors which are not seen on the live server version of the site at http://gorges.us. I have write permissions on the assets folder so I'm not sure what to make of these errors. Fatal error: Call to a member function filter() on a non-object in /Users/seankennedy/Documents/gorges-web/webroot/site/templates/home-page.php on line 13Warning: fopen(/Users/seankennedy/Documents/gorges-web/webroot/site/assets/logs/errors.txt): failed to open stream: Permission denied in /Users/seankennedy/Documents/gorges-web/webroot/wire/core/FileLog.php on line 63 This error message was shown because site is in debug mode ($config->debug = true; in /site/config.php). Error has been logged. Warning: Unknown: open(/Users/seankennedy/Documents/gorges-web/webroot/site/assets/sessions/sess_qrch1vdvp6im40f3r4csfi8qg7, O_RDWR) failed: Permission denied (13) in Unknown on line 0Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/Users/seankennedy/Documents/gorges-web/webroot/site/assets/sessions) in Unknown on line 0 Any help would be greatly appreciated. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted June 30, 2014 Share Posted June 30, 2014 Have you seen my post on setting up a web environment on Mavericks? 2 Link to comment Share on other sites More sharing options...
adrian Posted June 30, 2014 Share Posted June 30, 2014 I think the key thing is permissions on the assets folder - make sure that is writeable. 1 Link to comment Share on other sites More sharing options...
totoff Posted June 30, 2014 Share Posted June 30, 2014 (edited) Had the same problems when switching to a Mac. Installed MAMP, thinks are working fine since then. http://www.mamp.info/ - just in case. Edited June 30, 2014 by totoff 1 Link to comment Share on other sites More sharing options...
diogo Posted June 30, 2014 Share Posted June 30, 2014 I followed these http://coolestguidesontheplanet.com/get-apache-mysql-php-phpmyadmin-working-osx-10-9-mavericks/ and these instructions http://coolestguidesontheplanet.com/set-virtual-hosts-apache-mac-osx-10-9-mavericks-osx-10-8-mountain-lion/ everything is working great. There's also ammps that I tend to prefer over mamp http://www.ampps.com/ 1 Link to comment Share on other sites More sharing options...
seankobuk Posted July 8, 2014 Author Share Posted July 8, 2014 Thanks for the replies. I'll check out these links and let you know how it turns out. Link to comment Share on other sites More sharing options...
seankobuk Posted September 24, 2014 Author Share Posted September 24, 2014 I looked at these guides but I think my basic set up is fine. I am running many sites using php / mysql without a problem on this machine. The first error seems to be a php issue which is not my forte. I got rid of the last 2 warnings by changing permissions on that folder but the FileLog.php file warning has persisted even though it has all permissions set. Link to comment Share on other sites More sharing options...
seankobuk Posted September 24, 2014 Author Share Posted September 24, 2014 Here is the line that throws the fatal error 13 $cases = $this->page->selected_cases->filter("limit=3"); 14 15 if (count($cases) < 3) { 16 $cases->add(app()->randomPages($this->pages->get('/cases')->children->not("id=$cases"), 3 - count($cases))); 17 } Link to comment Share on other sites More sharing options...
horst Posted September 25, 2014 Share Posted September 25, 2014 Seeing the error would be helpfull! what is app()? Link to comment Share on other sites More sharing options...
seankobuk Posted September 25, 2014 Author Share Posted September 25, 2014 Once the PHP error was fixed all is well. Not really a Proccesswire issue. Link to comment Share on other sites More sharing options...
sforsman Posted September 25, 2014 Share Posted September 25, 2014 Here is the line that throws the fatal error 13 $cases = $this->page->selected_cases->filter("limit=3"); 14 15 if (count($cases) < 3) { 16 $cases->add(app()->randomPages($this->pages->get('/cases')->children->not("id=$cases"), 3 - count($cases))); 17 } I don't think the fatal error is related to your Mac installation per se. You are getting the fatal error because $this->page->selected_cases isn't an object. That either means a) $this->page isn't an object or c) $this->page->selected_cases isn't an object. Now, it is hard to debug this for you because you are not telling us the context of your code. Are we inside a template, for an example? What kind of field (i.e. Fieldtype) is "selected_cases"? It would help if you could do echo "Type of selected_cases: ".gettype($this->page->selected_cases)."<br />\n"; echo "Fieldtype of selected_cases: ".strval($this->page->fields->get("selected_cases")->type)."<br />\n"; echo "Page is an object: ".((isset($this->page) and is_object($this->page)) ? "yes":"no")."<br />\n"; ...and then copy/paste us the output. I can say in advance, if selected_cases is NULL, then I'd advise you to check the name of the field. Depending on the field, it could also be it's not holding any items (usually if it's holding multiple items it should then be an empty PageArray, for an example, and then filter() would work). The latter would be easy to fix by checking is_object($this->page->selected_cases). Anyway, if you want proper help, please fill in more details. @horst He posted the errors in the original post Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now