Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm fairly new to web development and I have only published one website before. With that website I only used some PHP and without framework. Now, I'm planning on using the laravel framework for my next, bigger, website. I'm wondering if there are differences between publishing a website when using a PHP framework? If so, what are the major differences and where can I read about it (googling has not helped me)?
You have countless options. Here are some I am aware of:
1. FTP'ing
Basically, you could just publish your site/app by FTP'ing it up to your server. The biggest issue will be the Database-changes. Here, the main influence is, whether are you able to run migrations or not? You would at least have to have ssh-access to your server with the required prerequisites installed. Otherwise, you would need to keep track of the changes in some other way, and change the db manually (which is not an good option IMO).
2. Automated deployments
There are server-deployment automation-tools, the one i know is capistrano. You can write scripts which do the deployment. These tools are also capable of running migrations, if you tell them to do so, but you would need to have ssh-access for that. Google will tell you the rest, here is a good tutorial.
2.1. Push-to-deploy
If you use SCM for your "bigger project" (which i would highly recommend), you could use push-to deploy technologies. This approarch basically uses Git-Hooks for triggering deployment-scripts. Deeployer could take care of that for you, if you do not want to develop your push-to-deploy-solution from scratch. Other alternatives are Rocketeer (Open Source) or DeployHQ (Paid)
2.2. Using laravel-taylored hosting/deployment/server-management services
Services like laravel-forge or envoyer offer zero-downtime automated deployments. I guess they are also based on push to deploy anyway. If you want to learn more about them, i recommend watching the corresponding laracasts-series (Forge, Envoyer). Be aware that they are not free.
I hope this overview gets you started. Happy deploying!
There is no difference between publishing a plain PHP website and one with a framework. Simple FTP up all your files and it will work, just remember to upload the framework files also.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 months ago.
Improve this question
I have a legacy project built on codeigniter 3 and we're looking to upgrade to the latest Laravel version. From some of the answers here, I can infer that it is definitely possible, I have multiple questions before starting.
Would it be practical? (would making it work with each other be a huge enough pain to completely rebuild the system on laravel)
Would it work across different PHP versions? (Current: 5.something; desired: 8.1)
If they're both running on the same domain, would session management be an issue? (would I be able to share session variables across the frameworks?)
Thanks for reading
It looks like CodeIgniter uses lots of global variables.
https://codeigniter.com/user_guide/general/common_functions.html
I'm not a Laravel dev, but I'm assuming that as a relatively modern framework, Laravel does not rely on many globals by default. So I suppose there's more opportunity for conflict, but only if someone is abusing Laravel.
(Laravel people: Feel free to correct me on this.)
Regarding PHP 8: CodeIgniter has at least passed this guy's smoke test on PHP 8.
https://forum.codeigniter.com/thread-78091.html
Since minor versions theoretically don't contain breaking changes, you may find success on 8.1 as well.
Regarding sessions: I know nothing about how either framework handles sessions, so I can't speak to this.
As for whether it's a good idea: I'm not sure I fully understand what you're trying to do. Are you going to have a CodeIgniter project running side-by-side with a Laravel project, using a separate subdomain for each? Or are you going to try to make the existing CodeIgniter project live inside of a Laravel directory structure, as the title of the question currently implies?
If the latter, I would say you're in for some tears. It sounds very painful. The former could work pretty well, I would imagine, especially if you're already using your PHP mainly to serve API endpoints and can just gradually move all the endpoints over to the new platform, one at a time.
I hope this helps.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I want to make an application where users use their own computer together with a host, the host click ”Start” and then there shall automatically show a button on all users computers at the same time. Then the first person who click the button will win. I want this to happen in the browser, but I dont know wich technology to use. I already know PHP and mysql, but I dont know anyway to update users computers in realtime. Wich technology would be the best choice to make this happen?
The solution here is basically web sockets, likely with a pub/sub layer on top. It can be done relatively simply with a decent Javascript and server-side library. PHP isn't the ideal language for this, but it works just fine with the right tools. Ratchet is a decent PHP web socket server implementation, and Autobahn|JS a decent client-side library (note: at the time of writing the latest Autobahn|JS WAMP implementation is incompatible with the older WAMP implementation of Ratchet, use Autobahn|JS WAMP v1). Follow the Ratchet tutorial, then expand into setting up a pub/sub server as described here (you don't need the ZeroMQ components, you'll be triggering events by a publish action instead of an external ZeroMQ event).
That's a 30,000 foot overview, go forth and try it.
Pusher.com has the ideal solution for this. You can send events, listen to these events and then respond accordingly. They have a free plan which I think is way more than you will probably need. Pusher works with JavaScript and it's extremely simple to get started
I suggest reading up on the documentation at pusher.com/docs
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am developing an internal website that is running Linux, Apache, PHP and CodeIgniter. I need to find a solution to satisfy the following:
Document upload. (Think word docs, excel docs and pdfs)
Document edit/checkout capabilities.
Document version control (who made what changes when to this document)
Wiki capabilities. (view, edit, create text for certain pages within the site)
Each of these things will be native within the intranet site. I do not want to link to another system to conduct the above tasks. I want all of the controls within the site itself.
I considered turning up sharepoint and mediawiki and using API calls to interact with it. However sharepoint doesn't play nice with Linux when it comes to APIs. Mediawiki has a horrible set of tools to add text stylizing. Making something bold/italics/underline is not intuitive at all.
Is there a plugin for apache which acts as a CMS backend? Is there some project that I could use to help me here? I am willing to build it from scratch but I also want to be smart about it. Any ideas what to use here?
What you're looking for is called a "document management system" and there are dozens of open-source free ones available. Do not invent one from scratch. You will spend months and will be stuck maintaining this system for years
If you want WYSIWYG editing, consider TinyMCE or CKEditor, both are great, and relatively easy to integrate into whatever backend.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm managing a team of 4 developers. We develop CMS based sites on a PHP / MySQL backend.
I want to improve the workflow. What i want:
Are there any services that host a git repo and sync it automatically with the servers?
Production server would be master branch
Testing server would be a different branch
we deal with many small sites and some large so we need workflow to be fast and agile
WHAT ABOUT THE DATABASE ? lol
(if anyone wants to add to the diagram PSD file can be found here: workflow.psd
I'd highly suggest using Beanstalk if you want something quick and easy to set up. It handles deployments very well. If you're looking at doing a bit more yourself (setting up the hooks and such) then another option would be github.
Please do not user Master as your production branch, master should never be production. A better workflow would be to have a Staging, Development, and Production branch / environment. Please see this guide about branching on Beanstalk's guides, it's pretty insightful.
As for keeping track of databases, if your framework / cms doesn't support database migration I'd highly suggest developing some form of migration / database version control in-house. You can also check out a framework like FuelPHP, which has migration built in. A nice little database version control system I found while poking around : dbv.php.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Can anybody tell me is a PHP desktop application possible? Like software we install on our computer system?
It is definitely possible to make desktop applications in PHP.
If you're looking for a starting place, I would check out (to cover the very basics):
Building Desktop Applications with PHP
Have a look at:
php-gtk
winbinder
PHP also comes with ncurses support if you are happy to deal with a character based front end.
However for standalone apps, you could do a lot worse that looking at HTML5's offline capability.
its possible to make desktop applications using php. You can run your php independent of you apache server.
Yes, you can use bcompiler to enable the production of php-gtk applications that could be used on client desktops, without the need for a php.exe. However, just because it is possible, does not mean it is practical. There is better platforms for developing desktop applications available.
Is worth noting you can also use Phalanger (PHP in .net) and the .Net framework to do some of the same stuff. Interesting, but useless, really.
PHP-GTK, WinBinder, etc... are very outdated and may not work in all three platforms. But the new opensource alternative is PHP Nightrain and it works great in all three platforms. Since the source is available you can always compile to any architecture you may need.
Here are some resources to help you develop cross platform GUI applications with PHP Nightrain:
http://www.naetech.com/php-nightrain
http://www.naetech.com/developing-ribbon-desktop-application-php.html
http://www.youtube.com/watch?v=GXt8erPLf4o
Hope it helps!