New to AWS. Need help in regards to editing a php file of an application hosted on ex2.
I'm able to connect to my ex2 via Putty and am able to locate and edit the php file. But when I refresh the browser cannot see my changes.
It's an Linux Ami.
Any help much appreciated.
Thanks Fabian.
The Php file is just one from the application not any configuration file. It's got a harmless form element.
However I'm not sure of any framework being used, as this application was developed by another developer who is not with the business.
As I'm trying to get a hang of the app, I tried and edited a text string within the php/htm file.
Hope this helps.
Related
Our website coded in php language was designed by some third party. Our whole project code with its database is in Azure. We now want to make changes to it and update it but we do not know how to retrieve php code of website from Azure. Any help will be highly appreciated.
Thank you in advance!
If you have access to the Azure Subscription where you app is hosted, you have several options.
Download the publishing profile and use FTP/S. This file will have FTP username and password.
Use the Kudu Environment (https://.scm.azurewebsites.net)
Use the App Editor (https://.scm.azurewebsites.net/dev)
If Continuous Deployment was configured you could grab the code from the repo (assuming you have access to the repo).
I have just created a simple REST Api following this small video using Slim Framework 3.x. I was just getting started and I followed the instructions in the video and created a simple route like this
$app->get('/', function($request, $response)
{
return 'Home';
});
This works on localserver (XAMP) when I open the link `
localserver/project_name/public/
` I get "Home" returned on the page.
After that I simply Zipped the project folder and uploaded it to my Web Hosting, htdocs folder. I extracted the zipped project, which included the "composer.phar" and "vendor" folder. I try the same thing again, i.e., I run the url
www.mysite.com/project_name/public/
All I've done is change "localserver" with www.mysite.com but the browser tells me that my domain
is currently unable to handle this request.
I know this might be something very obvious but I am a novice in php and REST Api's. So any help is appreciated. Also some things I think might matter are, The web hosting that I am using is Plesk based. I have a mysql database Running on the hosting and simple php files run when run individually. For example if I run simple call a test.php file with some database query in it and some echo, it will run successfully. Even if you can point me in the right direction, I would appreciate it. Oh, and I don't have access to php.ini on the hosting. I was only provided with one login that lets me login to the hosting and I can see htdocs folder among some others. I have attached an
image of the view I get after logging in, to give you more perspective of the type of hosting I have. I am hosting a website in the httpdocs directory as well. ASP.NET developed
I just need some direction as to what I need to do to be able to publish my REST api to my hosting and be able to access it through this android app that I am building. What do i need to do on my server? What settings to change to make the api work?
We have the following setup - remote repository with gitlab gui.
Our webserver is located on another server and we have ssh access to it. We also have local copies of our dev site, our git setup right now just push to the repo in gitlab.
My goal is to automate the process and on every push to gitlab repo to update the server dir with latest changes.
I saw that for this purpose we should use webhooks or deploy keys. I want to avoid using cron job.
I created a bash script which performs git pull after certain php file is accessed.
However when I placed the url to this php file in webhook section in gitlab, nothing happened.
If I access the file manually by typing url in address bar it works ok.
When I try to test the hook I get 500 error and timeout.
Any recommendations how to improve this process or where Im going wrong ?
The webhook does not just sends a get request to the provided URL, it also sends its data as JSON in raw data.
Can your script handle that?
Have a look at gitlab-webhook-push.php
The actual issue was that gitlab was not able to access our domain and was leading to timeouts, of course sys admins decided to restrict the access from external sources without notifying. Also it is good to mention that JSON raw data can be used for more complex solutions which is pretty nice.
This is just a hypothetical question. Let's say we have a website built using CGI scripts. I find a folder within it (for ex; www.website.com/links/link.txt) and it has some basic text files. When I enter this URL on a browser, I am able to see the file "link.txt". I also know that the website is running on Apache Tomcat.
My question is, how do I (as a user) edit this link.txt file? What tools should I use?
Unless you have a web-based editor you can't edit the files directly; this is for security purposes as if you can change the file that means anyone else can too.
You will need a way to either connect to the server and edit it using a remote session, or you will need to edit the file using your computer and then upload it. Unfortunately you have already mentioned that ssh and ftp aren't working, which are the two ways I would have otherwise suggested.
I would suggest you get in touch with your site host and ask them what functionality they provide to allow you to edit files.
Hope this helps!
I want to deploy a website stored on github to a shared server from OVH. So, basically, after each push I would like the new code to auto-deploy on my server.
I read this article (in french, sorry). To sum it up, it explains how to do it with BitBucket. They provide a php file to put on your server. Then, you make BitBucket send a POST request on that file, and it's over. Here is the code of that php file.
My only trouble is that I know nothing about php and that file is made for BitBucket and not GitHub. But I think it should be easy to make it work with GitHub. The only line to change should be that one :
$url = "https://api.bitbucket.org/1.0/repositories".$uri."raw/".$node."/".$file->file;
Instead of BitBucket I should adapt for GitHub... But I have no idea of what I should write instead...
Could anyone help me with that ?