I created a database project using PHPRunner to show data from a MySQL table in GridView. This project is saved in 'C:\xampp\htdocs\Project1\output'. When we run PHPRunner, this project runs on a XAMPP server in preview mode, but when we close the PHPRunner application, the project stops running in the XAMPP server.
How can we use this project code on my another website, so that the project can stay running? How would we use/embed this project into the site?
PHPrunner uses inbuilt server to preview your generated application. So quite obvious when you close Runner it will close the inbuilt server connection as well. You will have to move the output folder to root folder of your web server. If you look inside your project folder, you will find a folder named output, move this folder to the root folder of your web server, it should work fine.
Make sure your web server is powered to use PHP and other drivers related to your project.
If this is what you have
C:\xampp\htdocs\Project1\output
Then, copy the C:\xampp\htdocs\Project1**output** output folder to httdocs so it's like C:\xampp\htdocs\output it should work fine.
Check the url: it should be something like: http://localhost/project1/output. This when u run it with xamp. But when u open phptunner then it's server run it with different address
Related
I have access to server of our company's website. I access it using Putty.
I want to download all files(index.php, any jpg files for favicons, etc.) used for deployment of the web project. When I told to programmer of website to share the full script(HTML,CSS,PHP, jquery plugins), he said that I can access the entire code from server.
When I enter the server via Putty(private key+ssh), and then I type "ls" I see that there are "index.php" and "mysql" files, the full contents of which I cannot download.
What are the useful resources for list of commands?
Which command should I use to download the project folder containing all files with code and without code?
P.S. I do not know if this information is necessary, but the website was deployed using DigitalOcean.
As you are using Putty, I'll assume you are working on Windows. There is a GUI tool called WinSCP that works similar to Putty (i.e. over SSH and uses private keys and stuff) and can be used to access the remote server's filesystem. It has a pretty simple to understand UI which will be divided into you local filesystem and the server filesystem. Once you're connected and have reached the files you need you can just drag and drop the files into your local filesystem side.
If you would like to explore some command line options, its basically any tool that does scp. I think Putty comes with scp or pscp installed already. You can check by just typing in the command in your cmd/powershell.
You can download pscp.exe from PuTTY website and then:
Open cmd.exe and type:
pscp your_username_here#yourcompany.com:/path/to/file C:\Path\To\The\New File
I uploaded a php script to a subdomain that I own, for testing and customizing purposes before it goes live (I had planned on moving everything over to the root domain when done).
Someone then suggested that I work on in Xampp instead as it is all locally installed and therefore much faster, etc.
Thing is, I had already customized the script a lot (mostly CSS but also uploaded graphics via the admin panel, etc) while it was up live on the web host, so I would like to run a copy of the most up-to-date version of it in Xampp and continue customizing it from there.
I downloaded a copy of all my files by FTP into htdocs > Test folder. I also downloaded a copy of the database via phpmyadmin and imported it via phpmyadmin into my localhost.
The big problem I have is when I try to access the scritp via localhost, the url immediately reverts back to the live url. How do I set it to link to the local host copy instead?
Thanks.
Based on AbraCadaver's suggestion, I found the answer lied in changing the URL parameters in config.php
Thanks
I want to run a web application on a Windows computer but because of some reasons, I don't want to install a web stack like Xampp on that machine.
The web app is placed in a folder and inside of it, there are Apache, PHP, the database like MySQL or PostgreSQL, and the web source. If we want to access it, there is just a shortcut in the Desktop, and when we click that, the browser is opened and point to an URL with a particular port like localhost:8888. And the web app is opened.
I just want to put that folder in an installer. And the installer just extracts it to system folder and create a shortcut on the desktop.
I ask this because I have ever seen stuff like this. It used PostgreSQL. Simply like what I've just explained above.
If you know how to make it works, you may want to help me. Your answers will be appreciated.
You have three way to provide your web application as a software application
you can create portable server in pen drive server start by your application present on desktop icon.
you can create installer using Microsoft Installer which install all the requirement in one go then point ini file to your source code folder. This will let desktop icon to start xammp and run your application.(only applicable for window)
write python script to install web server using CMD and Terminal. then python script point ini to your source folder . Generate shortcut for server start command and launch browser with url.
we already provide Lab application in pen drive based server
I'm trying to write a stand alone web form to insert data into MySQL. I don't want it to be accessible to my web users. How do I get it to open up in my browser. It currently resides in my home folder. file:///home/user/file.php .
You have to setup a local LAMP, that is installing Apache and PHP (I assume MySQL is already installed)
I wish to use a PHP Framework such as Yii, however, it seems to set this up I need access to a terminal or console. Unfortunately my only access to the server is via an FTP client as it's shared hosting.
Does this rule Yii out as a framework?
all you need to do is
1 - have a copy of yii framework folder
2 - generate a new yiic webapp folder
3 - upload both folders, the framework folder can go to some hidden place yoursite.com/wawa/framework/yii, and you can just upload the files in your webapp folder to yoursite.com/
4 - edit the index.php in your generated web app, so it know where your framework/yii folder is. than you are set
5 - just make different copy of your webapp folder, so you don't need to generate them if you dont want to. just use different names, wont make a difference, as long as the webapp index.php knows where your framework folder is, than it will work
According to this post you can generated all files on your computer and then just upload the files to your shared hosting.
You only need a terminal for developing on your local server (it isn't a good idea to develop directly on a shared server). To use it on a shared server just upload it.
In the strict sense you don't need a terminal. You could write your files yourself. The yiic program only creates a couple of php files.
I am first in Yii. Installed the application locally. FTP-ing the application to the share server in directory /home/sloki/user/h11741/sites/example.com/www then create abcd directory within /www and put framework into it.
Edit your index.php line 4 to be: $yii=dirname(FILE).'/abcd/framework/yii.php';
You will get error message like this
Application runtime path "/home/sloki/user/h11741/sites/example.com/www/protected/runtime" is not valid. Please make sure it is a directory writable by the Web server process.
Change permission of directories /protected/runtime and /assets to 777. Test the web, when success change again permission both directories to 775.
Gut lak.