Essentially what I am trying to do is to create an interactive user set up wizard (often seen in CMSes like Wordpress or xenforo) when they first run the project. This would consist of basic configuration such as setting the parameters to the MySQL database, setting up and admin account, etc. The issue is, I'm not too sure how to go about going this in the first place. How would I go about overwriting values in the configuration file properly? What would be the best implementation for this?
Maybe this is what you're looking for?
Laravel Setup Wizard
Related
I'm looking for a way to build a php application (in Laravel) that reuses the existing users we have in a Drupal installation.
I found two suggested solutions on stackoverflow:
1) include the Drupal bootstrap and use their user_authenticate() method.
One thing I suppose will be a problem is that our PHP application is running on a different server. This approach will probably not work in such a case or can that be fixed by pointing to the Drupal sql server?
2) use the Drupal services module to authenticate users over REST
This might work over different servers/domains I suppose, but there won't be a way to automatically login users in our php app that are already logged into Drupal, or am I wrong.
3) synchronise the Drupal user data to our own SQL server
This would be a final resort, since this won't solve automatic login.
Are my thought correct in these situations. What would you suggest doing when Drupal and the PHP app are on two completely different servers/domains?
I ended up writing a custom provider in Laravel.
If you're interested in doing the same thing, here's what I did: Create a custom Drupal 7 authentication driver/provider in Laravel 4
Our main website uses symfony 1, and by the time I started working on the code it seems impossible to upgrade (too much custom code from previous developer). Now we are adding a large addition to what the company offers. Instead of using a really old framework I wanted to use CodeIgniter, also since I'm very familiar with it. My real question:
What is a proper way of setting up a website to use multiple frameworks. The new features will be separate from the original website, but it will still need a few tables of the database.
I was going to have apache handle where the root directory was depending on the url and just do everything normally. The main website is example.com and the new feature will be abc.example.com
I'm really looking for people who have done this and some tips and warning they had.
PHP will run the framework based on which directory is loaded on the server. For instance, on most apache servers the root directory for example.com would be /www. Which means all of the code for Symphony would be in /www/*.
When you setup the path of your subdomain, just put it outside of the /www folder. Then, when you go to abc.example.com apache won't try to load the original site along with the Symphony framework.
I think it will be fine for both frameworks to share the same database tables. I'm not entirely sure how you plan for these two applications to work, but as long as you don't change the column names and types you should be okay.
If you don't want the applications to share the data in the original table, then look into using mysqldump or something of the like to copy the data over to a new table.
I want to write yet another REST service, but this time using ZF tool. I wonder if there are already suitable project profiles for that around?
After creating a project with a default profile zf tool says
Note: This command created a web project, for more information setting up your VHOST, please see docs/README
Obvious to assume there exists a profile mechanism and hopefully other profiles.
Let me know if you came across those non-vanilla profiles (REST, console, etc.). Documentation per say seems to be a bit silent on custom profiling. Note: Alternatively a tutorial on developing your own custom profile is welcomed.
PS In case of REST it is obvious enough that one can reuse vanilla web profile following steps similar to this tutorial. But it would be much nicer to have a profile that takes into consideration better practice of using REST router as in here (hence a proper non-RPC approach).
[EDIT]
first part of the question - working with project profiles of
zf-tool is a duplicate of
zf create project path name-of-profile file-of-profile
second part of the question is to find/create such profile for
REST (based on ZF)
code & tutorial: https://github.com/codeinchaos/restful-zend-framework
I am supporting a site built on symfony. There were problems regarding some kind of "admin page".
While not knowing much about the whole thing by reading the logs and comparing recent backups I think I was able to fix the issue (some developer removed a route, but did not fix a template).
I do not have admin password to the site, but have root access to the server and super access to the database (in this case postgres).
Can you help me how to create myself an account without knowing the current passwords?
Disclaimer: I do not have much knowledge with PHP's OOP interface as I am not a programmer, but a sysadmin.
Edit:
symfony version 1.0.16
Try logging into the server and changing into the Symfony project's root directory. There's probably a "symfony" script/link there (the details depend on your OS and how Symfony's set up; you might be able just to run ./symfony rather than needing php symfony). Run this to see whether this basics are working:
php symfony
If that works, you should get a list of possible tasks you can do. If you're using the sfGuardPlugin, you should see some tasks like guard:create-user.
To get more information on a task, try something like:
php symfony help guard:create-user
But basically, assuming a fairly modern Symfony installation and plugin, try something like:
php symfony guard:create-user --env=prod newusername newpassword
(the --env=prod option creates the user in the production environment, which is probably what you want.)
If there are super-user-only tasks you want to do, try also doing this:
php symfony guard:promote newusername
That will give the new user super-admin privileges.
You'll probably also find a guard:change-password task which will simply reset the password for a given user.
I ended up editing the file named:
plugins/sfGuardPlugin/lib/validator/sfGuardUserValidator.class.php
this is where the authentication takes place.
I added a few lines to bypass the actual password check for an already created user.
In drupal, it's possible to create a "build", also known as "install profile" or "distribution" that basically combines several modules and your settings for them. So the next time you setup the same exact site, you don't have to re-configure all the modules.
Does Joomla have a similar concept, and what is it called? Please reference documentation as well if possible.
The concept is very simple - you just need to get a clean installation, install all the extensions you want and configure them the way you need.
Then it is enough to copy the files and the database to a new location and change the settings in the configuration file (configuration.php). That is all.
It is a very simple process and can easily be automated with a simple php script. I once did an asp.net app which was deploying new installations of joomla within seconds.
You could try something like http://www.akeebabackup.com/
This allows you to take a snapshot of a site and export it anywhere.