@awwang10 This is so that things like "apt" and other network subsystems use IPV4 over IPV6 for communications. In fact, on some configurations, without that setting the update service hangs for a while in order to resolve the AAAA records first. I just had to manually change that on a non-forge server recently. You can read more about it here: [https://community.rackspace.com/products/f/25/t/5110].
@simondavies I've just gotten used to doing "valet uninstall" and then install again on each version upgrade just to be sure. Doing that I have not encountered any errors yet.
@barbarouspony On another thread this was asked and I suggested an idea that I believe worked for the person that was asking. Since Valet relies on directories to resolve the domains, I suggested that the person create a symbolic link to the directory with their installation, and that they name this linked directory the subdomain they wanted. So like if you application is in "domain.dev" make a symlink and name it "subdomain.domain.dev" with something like:
ln -s domain.dev subdomain.domain.dev
That will make valet find your subdomain. Supposedly this worked for the user that needed it. Now, since the latests versions of Valet use Caddy server, maybe they will be able to find a way to make this simpler? I think it provides more flexibility. But for now this seems to work.
noeldiaz left a reply on Valet V1.1.2 Update: Just Keep Getting The 'It Works'
@simondavies Oh I see, you mean it is seeing another web server landing page. I think the "It Works" one is from Nginx. So it wouldn't be valet at all. Do you still have a VM running somewhere? Maybe Homestead? Check your VirtualBox GUI too.
noeldiaz left a reply on Valet V1.1.2 Update: Just Keep Getting The 'It Works'
@simondavies try the 1.1.3 one that just released. FYI, what I have been doing is doing a uninstall and a install on each major update. Just in case they keep making changes to the underlying driver. So far nothing has broken for me on all my sites.
@danzar got an untested idea. What is you made a linked folder for one of the domains to the actual folder with your app? Since valet looks for directories, that might make it work with both names. So like if the app is project.dev run this to make a linked dir next to it:
ln -s project test.project
Not sure if it would work but give it a try.
@renedekat Oh trust me, I know. Been working doing tech support for many years and still the daily struggle it real. :)
@renedekat It actually mentions most of that on it's installation page. Sure, it won't ensure 100% compatibility in your environment. And yes, it will require your to run local versions of other software (database, redis, etc) that might not match your production stuff. But for quick development it works. I've been using artisan serve for when I get started on projects. But yes, I do final tests and checks on either a VM that mimics production or one of my staging servers. That is the only way to be sure things will go smoothly.
But for someone getting started, this is great. I already had all the pieces (php, dnsmask, db) but this packages it in a nice bundle. Especially for my non-laravel projects. Working today on taking a stab at a driver for Drupal for example.
So I agree with you. There are things to consider and keep in mind. But there is no reason why you can't use this and then serve the same sites from Homestead. That is what I will be doing.
@jimmycook looks like your only option so far is to uninstall it or stop it after boot. But you know, on my machine it is only using around 6mb of memory. Heck, my weather widget uses much more than that. I don't see a problem keeping it running all the time. Now, I do stop and start the DB when I need it. Especially since I don't need that or Redis on all projects. Sqlite works great for just testing.
@nightmare is this running from inside a VM? Maybe the script sees itself differently. 8000 is the port to access it from the outside. Try localhost again but remove the port declaration and see if it works with just the regular port 80 maybe? I would try that first.
@lstables I just had it running with Homestead at the same time to transfer my DB contents from Homestead to a locally installed MariaDB. So you can run them both. But maybe entries on your hosts file are conflicting? Especially if you named them the same?
@adeptinkandpixel the config file should not be under root. Did you run it with sudo? The composer part or the "install" part? Everything should end up under your user directory "mmccarthy".
@christopher If you don't want maria running all the time, instead of the brew services you can do:
mysql.server start and mysql.server stop
You can see all the options with:
brew info mariadb
Same commands if you install Mysql instead of MariaDB too.
I've used this setup for quite a while now, just with a manual setup of php, dnsmaq, and database. This seems like a nice wrapper around everything. Now, I have tried to replicate the environment on windows, since setting up homestead there is always a pain compared to osx/linux. I had it working a while back using AcrylicDNS (http://mayakron.altervista.org/wikibase/show.php?id=AcrylicHome) but I don't have that windows machine anymore.
Now sure, this is not a reproduction of the "real" environment when the app going into production. I'll still keep Homestead around for that final check. But during the heavy development part of my apps this is good enough to get going fast and be able to switch projects easily. Can't complain about the fact that the app renders in a fraction of the time on each load too.
Plus inserting/updating many thousands of records on the database is way faster when it is running natively on the host! Had some problems since some of my databases are huge.
@virajkhatavkar Ah I see. Well, you can look at the code for that too under the "spark" folder in your installation. I see under "src\Console\Commands\UpdateCommand.php" the steps it takes when you execute it. Looks like it does basically the same as the installer: downloads the new zip version, prepares it, updates the views, and then runs any other update commands it needs. It is all nicely split in separate files you you can step through it and see what it does.
@Spec if you figure it out reply back. I'll do the same.
@Spec I see what you are saying. And I see that calling it like that works. But the autocomplete on storm is not picking it up that way. Same here. Not sure why. Even tried rebuilding the meta and ide files and still nothing.
@Specs you are correct, it doesn't seem to show that. The error states that function "get" is not a public static function, which is true. So you can access it with the :: operator. Now, this seems to work , initiating the object and then calling the function. It autocompletes perfectly:
$redis = new Redis(); $redis->get($key);
@virajkhatavkar Did you look through the code? (https://github.com/laravel/spark-installer) It actually was a lot simpler than I figured. Just executes a bunch of commands with the Symphony process component. I'm actually using it as a basis for a simple installer for my sites. I particularly like the way that it adds the service provider entries to the app.php file and package requirements to composer. Those are steps I keep repeating over and over and I want to streamline them.
@Specs My bad, I'm using that version too. Did you have it generate the meta file? That makes it work much better when resolving out of the IoC (https://github.com/barryvdh/laravel-ide-helper#phpstorm-meta-for-container-instances). If not, it's not popping any code hints to you when you try the Facade?
@Specs What IDE are you trying to get to work with it? I have it set up with phpstorm 9 and the usual hints pop right up. I also went ahead and generated the phpstorm.meta file to get it to work better. But the project I'm looking right now I'm not even using Redis and it all seems to work regardless out of the box.
@fsdolphin I develop and test locally, with either a VM or the build in php server. Once I'm pretty sure things work I push to my repository. After that I can pull down on my dev/test server to make sure everything works, or on production to deploy. I don't work on code other than on my local setup and always just push to repository (a Gitlab instance on a hosted server). But I also work alone so your situation might be different.
@infernobass7 Not sure if it is published anywhere, but maybe you could just open port 22 to the IPs of the forge servers. That way you don't have it open to the world. Other than that, it just uses SSH for everything. I have added private servers to it. But caution, it expects certain packages to be installed in certain ways for it to fully work. If you have a pretty basic Ubuntu setup with Nginx you should be good to go.
@pdechery You certainly don't want folders at 777. That is just asking for trouble since that allows executables to run from there. You should do what you say, make the webserver group (in your case httpd I believe) the owner.
But you know, you don't need for the server to own anything other than the "storage" and the "cache" directory. Looking at my sites I keep everything owned by my user account, but change group ownership on those two directories to the webserver user.
You could always have the webserver group own everything, but it is not needed.
I update some sites through ssh. Others with git. So far this setup has worked perfectly.
@thomthom out of curiosity, are you using version 14.04 of ubuntu or the newly released 16.04? If you are using the newer one maybe the packages are not updated for it? Check with:
If not, you could try updating the system first and doing a restart just in case.
sudo apt update sudo apt upgrade sudo apt-get autoremove reboot
Then try again? Maybe it will help resolve any missing dependencies.
@thomthom You won't regret it. On 15 sites now and I would not be able to stay on top of problems without it. Integrates well with other services too. Have it hooked up to gitlab issues to track things to fix and the ever expanding to-do list.
@thomthom NewRelic actually compiles quite a bit of information about php application errors. Definitely set it up on your server. For most things I use bugsnag. It is just $9 a month now I believe and it does a great job of collecting app errors. I really like it and I am trying to get the on premise version bought for my job.
@thomthom I've had good experience with NewRelic's free server monitoring tier. Here is a good article about how to set it up [https://serversforhackers.com/using-new-relics-free-server-monitoring].
I do most of my hosting on Linode so I also use their LongView monitoring service.
@thomthom You know, a few months back, I had all sorts of issues with homestead. Mostly because I was using a combination of boxes plus multiple providers (virtualbox and vmware). I had horrible slowness with Navicat to the box.
I ended up just wiping them clear and starting just with virtualbox from scratch. Have not had any problems for months and use the box on a daily basis for development.
@thomthom You should definitely only have 1 "homestead" box running. Sounds like you have 2 running at the same time. The homestead7 one is probably the older one, since that sounds like when homestead was just beginning to support php 7. I would stop them both in virtualbox, then start the right one from the homestead folder. Maybe you are having IP conflicts between them? For sure you are wasting resources running both, so that could also affect your performance.
As far as things to check inside the box, I would look in your laravel log in the "storage/logs/laravel.log" and even in your web server log "/var/log/nginx". One of those two should have more information about your 502 errors. But stop the rogue VM first and see if that helps.
@mcqueena Last application I set up with CAS was a laravel 4 app, and I ended up just creating a "cas" filter to use. Since you probably are using laravel 5, just create a middleware and do the CAS check there? Then, instead of the "auth" middleware, you can just use your CAS one. Should be very simple to do, just a straight swap with auth mechanisms.
@llevvi Hey there, just got back to this thread. Yeah, as far as I understand it LaravelExcel is just a wrapper over PHPExcel so it should have access to all the functions?
Now, I should say that even though I use it on some of my pages daily to export Excel files, I have not messed with the import for a long time. But this discussion interests me since I have one project now that importing multi-sheet excel files would be fantastic. Right now I cheat and convert to CSV (mostly since excel is a pain changing date formats and leading zero numbers).
So I don't have a solution for you, but I will see if I can give it a stab tonight when I get back to that project.
@llevvi I thought their documentation was pretty good? Is this where you went? http://www.maatwebsite.nl/laravel-excel/docs/import
Where in your code is it failing? I've had issues sometimes with weird excel layouts but overall works pretty well.
@ScottBaxter You can do it on your database.php definitions. Check out this post from Matt Stauffer's blog, shows all the options:
@Reached sounds logical. I had a similar problem placing multiple google maps on a page a while ago. Your comment made me look how I solved it. I guess I never really did but I ended up cheating. I also didn't want to repeat the code, so I ended up placing the JS code in a partial and then passing it the parameters I needed to make it work:
@section('scripts') @include('partials.googlemap', [ 'latitude' => $data['latitude'], 'longitude' => $data['longitude'] ]) @stop
Looking at the page I use that partial in multiple places to make maps, and that way I only have 1 place for the JS code. I also see I did something similar on another part of the page, where I had multiple bootstrap-multiselect drop-downs and I got tired of writing the code over and over and ended up doing this:
There I pass the element name too so it binds to the right one. That way I can include as many as possible on same page but just have 1 JS code.
@Reached not sure if this is anything, but I see that you are attaching your dropzone using the .image-upload class? If that is the case, and both elements are on the page, then they both would get targeted by the dropzone right?
noeldiaz left a reply on Develop Front End Theme As Separate Package From App
@harryg You seem to be on the same path I just started. I finally got tired of reinventing the wheel and I sat down yesterday to finally learn how to make packages. And I tell you, it is awesome. I think it would be just what you need. I'm still learning the ropes but now I have a modular section of my app that has it's own views, controllers, and classes. And just like you say, I wanted default views but the ability to publish and edit as needed. Here is the article/tutorial I started with [http://laraveldaily.com/how-to-create-a-laravel-5-package-in-10-easy-steps/].
Now I'm starting to hunt down other packages to see how they did things and learn some more.
@Piso this package from the Laravel Collective wraps SSH commands so you can easily execute them from within your application:
But like it was mentioned before, if you just want to run commands to do things like migrate and pull your site then Envoy is a good solution.
@yigitozmen the command you list for the cron job looks off. You are missing the "artisan" part. On the documentation it is shown as:
* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1
So I think you have it close, just missing that part.
@jasonlosito check and make sure you have turned swap on for your droplet. Without that you will crash when you run out of memory, especially on a small one. Here is a link to another forum thread where they discuss setting up the swap [https://laracasts.com/discuss/channels/forge/does-forge-run-ok-on-a-digitalocean-512mb-instance].
Won't be a solution if you end up doing more than what the droplet can handle, but should help you prevent most of the crashes.
@Cleon getting SQL Server to play nice from outside of windows is a pain. I know, I gave up and just moved the relevant php files to IIS on the SQL server. :) But your question got me wondering and I found this link with some more suggestions for under OSX [https://github.com/BellevueCollege/public-docs/blob/master/PHP/configure-mssql-pdodblib-mac.md].
Some things listed here I have not tried. Might give it a shot here soon. In case it helps. If I get to try it I'll report back.
noeldiaz left a reply on Trying To Install PhpMyAdmin On Forge/Digital Ocean
@dos Yeah, forge uses nginx for web server. I would not recommend running both apache and nginx, mostly since you will only be able to run one on port 80.
But you know, here's an alternative. I take it you already have a laravel site on forge right? And probably under nginx already? If so do this. Go into the "public" folder of the laravel site and create a new folder in there to hold the adminer php file. So line make a folder called "adminer" under public, place the file in there, and rename it to "index.php". Then, after you go into that file and fill in the settings, you will be able to access it as:
Anything inside the "public" dir gets processed as-is. So this works. Just tried it on one of my sites.
That's a quick and dirty way to get it up without having to mess with your webserver. The correct way, if you want it separate, it to set up another site under nginx and point it to a directory with the adminer file. I would also choose a more cryptic name for the directory so it is harder to find, and maybe even look into htpasswd authentication or IP based blocks on that directory.
But this should get you going.
noeldiaz left a reply on Trying To Install PhpMyAdmin On Forge/Digital Ocean
@dos well for your second thing you don't have php 5 installed, you have 7. So the correct command would be:
sudo service php7.0-fpm restart
Now for your first thing, it could be that MySQL is only listening to localhost and binding to it and thus will not allow you to just connect locally to it. That would be in your /etc/mysql/my.cnf. Might need to adjust your bind setting and restart.
Also, if you want something easier to install, I'm a big fan of Adminer [https://www.adminer.org]. One file and you are good to go with full compliment of options.
@concept_core Big fan of all packages from Spatie. Check out this one for roles and permissions https://github.com/spatie/laravel-permission and this one for authorization https://github.com/spatie/laravel-authorize. Lots of other good ones to check out in their repository or check out their nice list here: https://spatie.be/opensource/laravel