I have got heroku up and running just now. Not sure how to use the PostgreSQL and how to deploy my website though. It is a few php files. But they php files don't open they are just blank so I guess it is never leaving the index.php
Do i need to include or list all my php files in the default index.php file?
Also with the database i created one and it is in the dashboard listed under apps so now can I connect to it normally or is there more stuff to configure?
Would love some video tutorials showing how to deploy small database driven websites written in PHP to heroku.
Any help is great! Cheers guys :)
If you want to use postgresql database with your website on Heroku, you need this add-on. To set it up read this https://devcenter.heroku.com/articles/heroku-postgresql post.
As for PHP, you seem new to it. To include a file you need to use either require or include.
You can look at this video, for basic deployment of PHP on Heroku.
Related
I have created an administrative system for libraries which basically lets you register books, users, borrowings and all kind of stuff that happens in a library. To code and test it, I used XAMPP, in my own PC, using Apache PHP and MySQL to structure and develop the application.
It works, and has a very complete and efficient set of functions and utilities, that is why I plan to implement it in my school's library, that for years has been using Microsoft Excel as a tool to organize all the books and students.
The thing is: I don't understand how to setup this app as a local web application. The idea is to install the folders and files in the library computer so it can control the system locally and through a browser (using localhost to access the PHP application).
I know it is possible to simply install XAMPP manually and copy the folder to htdocs and then use it normally, but I want to eliminate the manual part, and have some sort of setup that lets any person install the app without having to understand how Apache or MySQL works.
Does anybody know what could I do? I have though of creating a series of batch files (the library PC uses Windows) and move folders, create shortcuts, etc. using normal cmd commands. It would be a better alternative, but still the user would need to go through XAMPP (or some other service) setup prompts.
Thanks very much
you can create a bash file to automate this process.
Currently I will upload a website to a server, but before I upload it I want to run this website on my localhost (I'm using XAMPP).
They gave me an archive containing the website files, based on the structure of the webfiles I realize TYPO3 is used.
Since I never tried using TYPO3, I tried installing it I followed this steps:
here
After the installation I run the sample, so far I don't have a problem running it on my web browser.
But when I tried to run the website that I need to upload
I'm getting an error.
here are the files inside the archive.
Here is after I extract it. As you can see I wasn't able to extract typo3_src which is the target location of index.php, t3lib and typo3 file that are all both in .symlink type.
And also the typo3 is not in folder type unlike the sample I run.
I'm not sure if the archive is broken/corrupted or I need something to do first before it will work. Can someone please help me regarding this issue?
You do not need to deal with those unix symlinks at all.
Just figure out or ask the person who provided you with that system, which version of TYPO3 you need to use.
Then go to https://sourceforge.net/projects/typo3/files/TYPO3%20Source%20and%20Dummy/ and download the appropriate zip package.
Decompress the package, delete all symlinks (typo3, t3lib, index.php) and just copy the corresponding resources from the package.
You then need to deal with the database and database connection settings in typo3conf/localconf.php or typo3conf/LocalConfiguration.php.
If it all works, you can then upload it like this to the server without using any symlinks.
I know this question may first appear to be a duplicate of others, but I'm asking this because I have WordPress installed in my /var/www/html directory. I was learning WordPress a couple of years ago before creating a website and never used it again.
Well, I'm creating a php project using PhpStorm and testing in my browser. I'm following a tutorial so I can configure my databse (phpmyadmin), and the instructor keeps going to his localhost, which displays the directory structure as seen here:
Since I have WordPress on my localhost, navigating to that takes me to my WordPress installation, which is not what I want to access.
I would rather ask this question on here before I potentially break my Apache configuration, so how can I access this project? Do I need to remove WordPress completely? It would be nice to keep it for future testing since I'm slowly getting into making plugins.
What are your suggestions? I can't really say much as far as "what have you tried?" since I don't know where to begin.
Running in Chrome within my PhpStorm IDE takes me to localhost:63342/projectName/respectivePhpFileName.php, but I can't access it outside of the IDE yet.
Any help would be appreciated.
Just move your Wordpress outside your htdocs folder...I think he is using something like XAMPP so in that way is very easy to do it, because the folder without an index will be detected as a directory not a Wordpress URL (correct me if I'm wrong). So if that doesn't works, just go to your htdocs (/var/www/html or opt/lampp/htdocs in Linux) directory (or where your wordpress is stored) and move it to other folder (like My documents) where you can backup it, and that's it, you can create that folder and keep following that tutorial.
I have included my php project developed in Codeigniter inside Netbeans project explorer.
But when I goes to run it with URL localhost:8004/index.php.It shows me following error.
> Unable to connect Firefox can't establish a connection to the server
> at localhost:8004.
I dont understand what is the problem. Please help me.
Honestly, you're better off running this in something like WAMP. As someone who uses CI on a daily basis, just go with me on this. The way they index the files and the file paths is using a routing file rather than actual file paths.
WAMP Server
(Sorry, newbie here)
So I managed to push my local php web app to their servers, using the tutorial I've found on the net on how to push php projects. It worked perfectly fine.
Now, when I load my site. The script installation appears (Vanilla Forums) and so I did the proper installation and used the CLEARDB add-on to provide MYSQL database for the site.
The forum is only part of my whole website, the problem is.. every time I change something on my website, git commit it and pushing to heroku.. The app installation of vanilla forums reappears.
How could I stop git or heroku from changing the forum part to it's last commited state?
(Note that I have successfully installed the forum software but when I commit and push because of a small update to other part of my site, the forum software reinstall again)
For better understanding:
My site url: http://codeknack.herokuapp.com
The forum url: http://codeknack.herokuapp.com/forum
This is the structure of my whole website:
index.php
challenges/
meetups/
tutorials/
community/
forum/
where in the forum folder lies the vanilla forum php script and when I edit just part of the index.php of my website, vanilla forum shows the installation screen again.
(If I am too vague, please tell me what part you are confused at)
This will really help a lot, thank you!
That's why they invented the .gitignore file. You can specify files, directories, and wildcards to be ignored by git.