easy way to get a php/mysql site going?

eon

2[H]4U
Joined
Oct 11, 2003
Messages
2,218
Guess its worth a shot asking. Doing a school project that is to use a web based database and still have troubles setting up the site using postgres on a school virtual server. I recently installed apache, php, and mysql on a VM so I guess one easy possibility is using a VM to host a website... is that possible?
 
I recently installed apache, php, and mysql on a VM so I guess one easy possibility is using a VM to host a website... is that possible?

most definitely...
 
Is there a reason why you need PostgreSQL? You have MySQL installed and would be my preference.
 
I'm not about to argue things like stability but...


MyISAM causes brain damage.
 
If it's just for local development and testing, you can use an easy install package for windows, like Appserv. I've been using this and other packages like it for years to develop and test sites locally, before uploading them to live Linux servers.

AppServ
 
when I connect to a database for a webpage what do I pass in for the host?
it seems to work fine when I use 'localhost' when I execute the php file locally but when I try to access it online, it just shows a blank page

ok just found an error log:
[Mon May 26 06:58:26 2008] [error] [client *****] suexec failure: could not open log file
[Mon May 26 06:58:26 2008] [error] [client *****] fopen: Permission denied
[Mon May 26 06:58:26 2008] [error] [client *****] Premature end of script headers: test.php

what should I chmod the database directory to?
currently my database directory is in a different folder than my html folder
 
when I connect to a database for a webpage what do I pass in for the host?
it seems to work fine when I use 'localhost' when I execute the php file locally but when I try to access it online, it just shows a blank page

ok just found an error log:
[Mon May 26 06:58:26 2008] [error] [client *****] suexec failure: could not open log file
[Mon May 26 06:58:26 2008] [error] [client *****] fopen: Permission denied
[Mon May 26 06:58:26 2008] [error] [client *****] Premature end of script headers: test.php

what should I chmod the database directory to?
currently my database directory is in a different folder than my html folder

no, you need to use the name of the server itself if you want to access it from outside. Also, make sure your firewall points port 80 connections to your server.
 
ok so if the access page is http://a.b.c.edu but the server I ssh onto to put the files is x.b.c.edu which one do I use as the host?
thanks

The second one. that's the internal name of your server, the first one is your DNS address. When someone goes to a.b.c.edu, if its set up properly in DNS, then it will send the request to your IP address. Usually, your IP address is actually your router, which will need to be configured to pass that request on to the appropriate server in your network (x..b.c).. I think where you're getting confused is with the name of the internal server, it does not have to be a fully qualified DNS address, you could call it "fred" if you want, so long as your router sends all http requests to the IP address of "fred".
 
ok thanks, I tried the server itself again (this was actually the first thing I tried when it didnt work) and again it didnt work
later I realized I forgot to put the !# directive header in the php file which fixed the permission error and the webpage then atleast displayed the error message
and then I changed the host back to localhost and it worked ;/
 
ok I guess Ill ask some php questions in here instead of creating a new page

I have ZERO php and html experience and a project due in 2 weeks. How do you go about linking pages together with common variables and a common database so that maybe one page opens the database and declares the variables and the other pages can see it?
 
You would really be better off reading a tutorial to get a handle on the basics. There are plenty of them to be found. Even if someone wants to hold your hand and help, a forum is a very poor tool to do so for more than a couple of questions.
 
i agree a forum is not the place to start, there are just way too many question that you'd need answered that would best be served by reading some tutorials instead.

I recommend you start by going to http://www.w3schools.com
 
this is actually a question I searched around for a while prior and have yet to find an answer
 
I just setup a PHP5 / MySQL5 / IIS6 webserver last week in a VPC7 VM. Took me all of half a day to get done. I even have phpBB and a simple mailserver running on it now.
 
ok I guess Ill ask some php questions in here instead of creating a new page

I have ZERO php and html experience and a project due in 2 weeks. How do you go about linking pages together with common variables and a common database so that maybe one page opens the database and declares the variables and the other pages can see it?

Sessions variables or cookies will allow you to share data across multiple pages.

The reason you didn't find an answer is because you just asked the question: "How do I do my project?"

Maw and Bry are right, you need to break this down into pieces:
-Make a basic html page
-"hello world" PHP
-Connect to the database
-put data in database (either with sql (insert into) or phpmyadmin style)
-pull out and display data from database
-etc..

GL, the next 2 weeks is going to be rough.
 
wow all you had to do was say session variables or cookies and I would have looked into it. That was all I was asking for.
I was not asking someone to do the project for me, heck the website implementation is only a minor part to it. I already looked around, learned how to use stuff like GET to pass in values from forms but didnt find much on variables not in forms and keeping the database connection persistent.
 
wow all you had to do was say session variables or cookies and I would have looked into it. That was all I was asking for.


well, when you said....
I have ZERO php and html experience and a project due in 2 weeks. How do you go about linking pages together with common variables and a common database so that maybe one page opens the database and declares the variables and the other pages can see it?
...implies that you will need to "look into" a heck of a lot more than just session variables to get this project going. I'm not sure it's a good idea to just jump into researching random aspects of web development based on the buzzwords you pick up in random comments. You really need start with the basics first.

You can't just start using session variables until you actually know some PHP, but more importantly, you need to know WHY you would need to use them and what the potential pitfalls are. The same goes for a host of other web technologies.

Here are some other technologies you're going to have to be familiar with before you even touch things like session variables: xHTML, CSS, SQL, Apache or IIS configuration, DNS, firewall.
 
Back
Top