Forum Moderators: phranque
I'm truly a novice, can anyone help? I'm trying to get my first assignment done, and this isn't helping!
Thanks!
Brian
There are a couple of threads in the PHP Server Side Scripting Forum Library [webmasterworld.com] with step-by-step instructions for installing [webmasterworld.com] Apache and PHP5 on Windows. Perhaps they will get you through the installation effectively.
Look through your documentation for the preferred starting method.
Here's a recent thread about using apache and php on Windows XP [webmasterworld.com] - perhaps there's something helpful in it.
Oh, and welcome to WebmasterWorld :)
I was aware that I needed to start the Apache, that wasn't the problem.
Anyways, thanks for the help guys.
I have another question if anyone can help... I am basically doing this to run a test server. I have a backup of a website I want to use as a starting point. I figured out easily how to recreate the database (MySQL) using the text file backup. Now I have a .tar file of the actual site content (PHP, HTML). I opened it with winzip, but now where does it (site content) go? htdocs? How do I tell it where the MySQL info is. It is 2 main folders (var and home).
If you can help or point me to online help/instructions that would be great!
Sorry again for being such a novice, but I am not just tinkering. I am committed to becoming a webmaster!
Yep, exactly, make a subfolder in /htdocs/, say: /htdocs/testsite/
In that folder, extract the packaged file with the two subfolders. Like this:
a) /htdocs/testsite/var/
b) /htdocs/testsite/home/
The root of your website will probably be in the /home/ folder. In your browser, the path (b) above should be:
[localhost...]
As for MySql, this will probably be written into the php files. You will need to look for something like this:
mysql_connect("localhost","username","password") In the php files "localhost" might be some path but it should be localhost on your machine. The username on your machine will probably be "root" unless you have chosen another. Password could be anything, including "" (blank).
It seems like there isn't much under the /home/ folder, but the bulk of the site exists under var/www/html/ and var/www/html/en/
Does this sound normal?
I'm getting 500 Internal server error. On any php files that I point to.
Any ideas?
To be more specific... when editing the PHP files:
if it lists a reference to [sitename.com...] should I change it to [localhost...] In which cases can I just put /en/images instead (I noticed it is done this way in several places already).
Thanks to anyone who can help!
Brian
Yes it does. The only reason i suggested /home/ was because i didn't know your folder structure, ie. "var" is shorthand for "various", so it could be anything. I think it's safe to assume that what lies in a /www/ folder is supposed to be web content :)
As for your path names: Yes you should change those to point to localhost in stead.
A server error 500 could be because the php script is looking for some module to include, but it can't find it on the path that is specified in the code, so double-checking paths is always a thing you need to do.
So I commented out these commands, and I no longer get the 500 server error page. I now get this error:
Fatal error: Cannot redeclare database::get_single_column() in C:\apachefriends\xampp\htdocs\ENDEV\var\www\html\en\include\database.class.php on line 191
Because these files are an exact copy of a working site, I think it is still a configuration problem. The database is in this folder C:\apachefriends\xampp\mysql\data\
Again, any help has been appreciated. I am also doing some reading on this but I really want to get this site up to tinker with (even with errors).
The statement on line 191 of the include file is probably a repetition of a statement that has already been issued somewhere else in the code, ie. it's related to this function: "database::get_single_column()"
Perhaps the fix is as easy as commenting it out by putting a # in front of it, but i'm not that much of an expert on MySql - perhaps others can help here?
Otherwise, this search [google.com] might give you something helpful.
Your assistance (claus in particular) is truly appreciated!
The challenge now is that the site is dynamic, but makes itself appear to have distinct html pages. I don't even know what this means, but someone who knows better told me it is true. It makes the whole thing a bit strange to someone new like me... oh well.
I'll try my books and such to see how helpful they can be. First on the list is to find out what exactly "href=" means and does.
thanks!
ROFL :) Surely you don't mean that you're working through advanced subjects like PHP and MySql without having done basic HTML first? That's just like going straight to interior decorating without having built the house - or, actually it's more like installing the HVAC, plumbing, and electricity before the house is built.
Anyway, if it's the case, your PHP book won't tell you that. You will need a basic HTML book/tutorial in stead. It means "Hypertext REFerence" as far as i know, but that doesn't really matter, it's just a code stating that a link starts here.
If you're not joking, you should really search the web for "HTML tutorials", "learn html" or something like that - there's plenty of real good ones out there. It's way easier than PHP so you'll learn the basics in a day or so, but you will get very confused working with PHP without knowing it, as it's just something that's assumed to be known, so they won't explain these things in the PHP book.
I never do things the normal way, and it always works out. It's just the way I am. Thanks for your concern though! I know how little I know, and that's the first step.
Nothing beats that - that's about the best kind of motivation :)
You should take a look at these forums too, if you haven't been there already:
New to Web Development [webmasterworld.com]
PHP Server Side Scripting [webmasterworld.com]
Website Technology Issues [webmasterworld.com]
HTML-related:
HTML and Browsers [webmasterworld.com]
Javascript [webmasterworld.com]
CSS [webmasterworld.com]
There are always a bunch of helpful people there that knows a whole lot. By the way, i think i forgot the tradition:
Welcome to WebmasterWorld bjh5000 :)