Create New Application of Yii Framework on cPanel - yii

I uploaded Yii Framework to my cpanel and now I dont know how to create new application while I did it on my local host using CMD.
I have not any shell access on cpanel and search this question but I found no related answer for this question.
Please help me out!
Thanks!

You have to deploy your application in another way, eg. with FTP, git or rsync.
Upload your complete application, but make sure to exclude and/or set the correct permissions manually for certain folders eg. assets and protected/runtime.

create your app on a local pc, then upload your app to your host. It's that simple.
you can skip making app using cmd on your host!
then just point to the frameworks location in index.php

if you have other apps which are been used by your YII app make sure to install them from Cpanel install php packages.For instance if your using LDAP authentication run a php5-ldap package. If your not using any packages upload your site and your good to go.

Related

Move files from node.js to apache server

Is there any possible for moving files from platform like Heroku to second server like Apache? I want to create application and push it to Heroku, but I have also Apache server and I want send to this server all images which I upload from frontend forms.
EDIT
ok so You want to use Heroku as the main application server. But then Heroku makes HTTP/HTTPS requests to the Apache server?
I think thats what you are asking.
Yeah no issues with that. if you want to set up API id go with Laravel 5.3 and use its passport function on your Apache server ( but this is not required, this is only for security.)
https://laravel.com/docs/5.3/passport
END OF EDIT
what the web server is really does not matter at all.
Its about if the server has internet access and im pretty sure they do.
Easiest way is ftp,SSH,or git. unless they both have a web server then id just zip up your app without the node_modules folder and move it into the web directory. then go to the address of your server in a web browser. eg. http://mywebsite.com/files-i-just-zipped.zip and download them. (i normally log onto the new server via SSH and do wget http://mywebsite.com/files-i-just-zipped.zip)
I need more info but yeah. once you unzip then you need to install node but my guess is they already have it.
then do npm install in the package.json directory.

How to move server project to my localhost?

What I'm asking is not how to move localhost to remote server.
I'm new to server so I don't know how to move project I have to open? launch? at my localhost.
I try to develop Magento at localhost and develop and test Magento service at my own laptop localhost.
But I'm in troubling moving my project cloned using GitHub to my localhost.
Install wamp, start it's services.
clicking the wamp icon in your system tray will allow you to access 'phpmyadmin'- use the databases tab to create a new db (for development at home I typically leave the db user and password as 'root').
Inside wamp's install directory is the 'www' folder. create a subdirectory within it, download magento and extract it into your newly created subdirectory.
If you unzipped your magento files to c:/wamp/www/myproject then point your browser at 127.0.0.1/myproject and you should see the magento installation page. Follow it through until you finish installing.
Now when you go to 127.0.0.1 you should see the front page of a fresh magento install. appending the url with /admin will let you log into the back end. Do this, and then navigate to system -> cache management and disable all the caches.
You can now copy across any work you've already done on the project into your relevant magento folders (presumably /app and /skin)

LocalResource not available after publishing mvc4 to azure

I've a very simple application built in MVC4. This application allow the users to upload a file, and the application generates an output.
This app works great locally, but when I publish to azure (by right click -> publish), I get a less descriptive error. I've figured out that the error was because in the code, we accessed to a server relative path, and that is not possible in azure. So I've found a way to solve that in this link, that says that I should use LocalResource, rather than Server.MapPath. That make sense for me, but so far, I'm struggling with the suggested line.
LocalResource localResource = RoleEnvironment.GetLocalResource("DownloadedTemplates");
I'm not able to get it working, and also can't get a proper error. BTW I'm not sure how to enable the error log in azure :(
So, after going deeper in MSDN, I've seen that I should configure the Local Storage Resources, but as I've created a local MVC4 project, I can't find where I should configure this.
I need to be able to store a temporary file in the application (hosted in azure).
Did someone faced with this problem?
Anybody knows how to enable the Local Storage Resource in a project like that?
TIA!
Milton Rodríguez
Well, after struggling a while, I've ended up using Windows Azure Tools.
The steps:
Add a new project
Under Cloud category, select Windows Azure Cloud Service.Note that if you don't have this option, an option to install the needed SDK will be shown. Install it first.
Name it properly :)
New Windows Azure Cloud Service window will appear, select the role that fits your needs. In my case, I choose ASP.Net MVC4, and then removed it.Note that you can edit the name of the created role at the right.
In the Roles folder of your new project, select Add, and then Web Role Project in solution. Your project will be an option to add.
You can remove the other role in the folder, the web project created in step 4, and also the folder ending in Content (ie. WebRole1Content). Basically, you can remove the created assets, but the Azure Service, and link the service to your project.
You're almost done. Follow this link to configurate your local storage :)
Now you're done!

How can I copy a YII project to another server?

I have got a YII website and I would like to make a copy from it to another domain on nginx server.
I just tried to copy it, but it doesn't working. It looks like it don't use my htaccess?
I know when I make I new project I have to install it. Is there any copy-er for YII?
The probable reason it is not working is because you have to change the location of the entry script in the index.php for the correct location for the yii main folder.
Try doing this :
Try making a new Yii webapp in that location and check that it
works.
Now copy the index.php file from that folder and then put it in your
main webapp.
If the site is still giving errors then check if the database connection is consistent and check that the server has proper write access to the main webapp folder.
Hope this helped.
Regards,
Yii is just made of files and (optionally) a database. Provided you copy both to the new server it will just work. Yii also requires server write permissions on /protected/runtime and /assets.
Make sure you're copying hidden (start with .) files too. You could use git for this and clone it into the new server.
It was something with the server. We use webmin ot that server and I hade to rewrite the config of this domain manually, after that it works great.

Best practices for using app_offline with webdeploy

When I deploy my web site I need to:
Take the site offline.
run sql to update the database.
update the web site.
Put the site back online
I would like to script as much of this as possible without have to go the server and make manual changes.
I am currently using WebDeploy to push my website changes. It works great, and I don't have to know exactly where my site is installed on the server.
So what is the best way to put up/take down the app_offline file? If have seen some solutions where you rename an existing file ( app_offline.htm_ ) using an msbuild script. But it seems like that would require me to know the location of this file.
Is there a way to do this through web_deploy?
Thanks
Yes, you can enable AppOffline during a WebDeploy deployment you can even customize the AppOffline template:
msdeploy.exe -verb:sync -source:iisApp=sourceApp -dest:iisApp=destApp,appOfflineTemplate="offlineTemplate.htm" -enablerule:AppOffline
https://blogs.iis.net/msdeploy/webdeploy-3-5-rtw