I just started out with CakePHP and try to configure a plugin.
The plugin requires a table and contains a schema.php file that contains a class describing the table. From what I gather I have to run a command in my server CLI that will build a table according to this schema.
But my server doesn't seem to have CLI (it's cPanel, and my website is hosted by a good but cheap host). I tried to access the server using Putty, but the connection is aborted when I try.
However, I do have phpMyAdmin where I can run SQL commands. So if I can 'convert' my schema.php in the appropiate SQL commands, I can copy these manually and run them. Is there an easy way to do this?
(I know, the fasted solution is probably to just enter the table by hand. but that would be boring)
Thank you!!
Scipio
Related
I recently created an Ubuntu Virtual Machine in VirtualBox to create a new project.
So now I created my database in phpmyadmin and I wanted to export my database to keep the data.
The thing is that when I try to export it it throws an error that says that the database couldnt be exported because the origin file couldnt be read.
It may be a php configuration problem (php.ini)? or maybe I created the virtual machine on a wrong way?
Thank you in advance.
For security, if you want to save a database, do a dump on the server directly.
You can take a look to this link : https://www.digitalocean.com/community/tutorials/how-to-import-and-export-databases-in-mysql-or-mariadb
phpmyadmin is good to have something more visual for an human and manage some little changes. But it's not enough secure to be publish on internet. Becareful about that.
i try to solve the case where i need to make a PHP release on multiple remote Server nodes at the same time.
We got a Jenkins server wich does the following steps in his build (ant) script:
Git Checkout
PHP QA Tools Check (like PHPUnit, phpmd etc.)
Do some other tests
After everything is OK i want to deploy the sources to 3(later maybe more) remote Servers.
After everything is pushed to the Webnodes i want to execute a symlink change on all 3 nodes at the same time.
Sounds kind of impossible to me, but i hoped that i get a solution somewhere here, but i didn't found anything that helps.
So hopefully someone here got a good idea or some experience to share.
Cheers,
Dennis
You should look at this link because PHP deployments are a bit different from Java/.Net related deployments. However, if you feel that using Phing along with Jenkins OR using Phing independently is not what you want, and would like to simply have some plugin which copies your content to few remote servers, then you should try using Publish Over SSH plugin. After the steps in ant script mentioned above completes, you can add the task of deploying the sources to remote servers in Post-build Actions section. Once you've installed the plugin, you will find Send build artifacts over SSH option in the drop-down menu of Post-build Actions. Here you will find options to select multiple servers and you also have option to run command over those machines once the sources have been copied using Exec command that i have highlighted in the snapshot below. Also don't forget to check the Advanced... options and the help (?) section for each option.
We have a company doing several websites for us using the YII framework. The developers tell us that in order to run protected/yiic.php migrate that they must have SSH access to our server.
We are reluctant to provide SSH as there are many clients on our server. Is SSH really required as they say or can this migration script run via other means via the web browser?
You can write php-script, that will execute migrates, use CConsoleCommand for base, but it is not simple issue.
The fastest way run the migration only SSH, but approach proposed by Alex also nice.
I am testing an application in MAMP and would like to add a cron job, or as I am on a mac the job through is run through launchctl. My cron is a php file that runs a database query. Naturally the php file and mysql db are in separate directories. Where should I change my working directory to such that the cron will query the database? FYI, I have a standard installation /Applications/MAMP/...
Many thanks.
My mistake above was that I was trying to point to the database's directory, when the php file had already handled that for me. Running the program was as simple as running the following code:
php -q /path/to/my/doc.php
I found it was easiest to manage launchtl through a $5-$10 program called lingon. Highly recommended if you are considering managing multiple crons at a time. Otherwise, if you want to stick to the command line, this is a good tutorial.
Good day,
I have an application written using the Symfony framework. The application works on my development server, where I have shell access. However, I am unable to load my application on my host, as I need to run symfony doctrine::build on the command line on the host.
Is there another way to load the database after or during symfony project:deploy?
You shouldn't be building anything on the production environment - to deploy your SQL, use whatever tool you use to connect to the server, ie. SQLYog, PHPMyAdmin, etc. and use the SQL schema created by Doctrine in your dev environment. If you need fixtures too, you can always just dump the SQL schema and data from your dev database.
Consider that over a project lifecycle, you only really need to deploy the main SQL schema once - the rest is iterative via migrations.