Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2009
    Location
    North America
    Posts
    6

    Question Looking to set up apache/mysql/php.. (I think? Newbie here.)

    Hello everyone! How are we today?

    My name is Kangaroo32 and I'm new here. I just finished signing up (reading the rules took so long! ), and I would really appreciate it if someone here could provide an answer to a rather wordy question.

    I have some light experience using PHP and MySQL, from the days in high school. Currently, I need to set up some sort of database with forms and multiple tables. I'd also like to receive feedback from the database (for example, if I have a list of friends' birthdays, I would like the database to let me know when a birthday is coming up, say 24 hours in advance). I'm pretty sure that all of the above can be done by a PHP/MySQL combination, and as that's what I feel comfortable with already, I'd like to get started coding. (unless somebody knows a better way -- these languages are really simple)

    Also, I want to avoid using a web server to do all of this for general security reasons, as well the cost of paying for such a server. I remember a friend suggesting something called "Apache", but this is as far as my knowledge in this area goes.

    I'm running Windows XP Pro, SP2.


    As the saying goes, I would very much appreciate any help on setting up something on my computer to run a MySQL/PHP database (locally).

  2. #2
    Join Date
    Dec 2009
    Location
    North America
    Posts
    6
    My current issue is this:

    Use the links below to download the Apache HTTP Server from one of our mirrors. You must verify the integrity of the downloaded files using signatures downloaded from our main distribution directory.


    There was a link there, to explain this foreign language to me, and that link led to this:

    The following example details how signature interaction works. In this example, you are already assumed to have downloaded httpd-2.0.44.tar.gz (the release) and httpd-2.0.44.tar.gz.asc (the detached signature).

    Which release and signature?? They're assuming too much for me >.< I thought I was getting version 2.0.63 or 2.2.14? httpd.apache.org/ says that 2.0.63 is the "stable" version. Does that mean 2.2.14 is unstable? There are too many new terms here.


    Maybe this better conveys my problem: confused as all hell
    Last edited by Kangaroo32; 12-16-09 at 12:40.

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    don't bother getting individual components

    unless you are experienced in resolving installation issues then I'd strongly recommend that you use an XAMPP download for whatever OS you are using. that will install and configure MySQL, PHP and various other items. however you do need to read the documentation set to make certain its configured correctly for the use you require. XAMPP out of the box isn't suitable for production servers, and it probably need refining to work as a development platform
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Dec 2009
    Location
    North America
    Posts
    6
    Congratulations:
    You have successfully installed XAMPP on this system!




    Thank you I'll post here again if my computer blows up / the internet kills me / nibiru etc

    But for now, everything appears to be on course. Thanks again.



    Edit:

    I played around in the various CPs and some of the files (i.e. config.inc.php), but no matter what I do, .php files do not seem to work. With the test file in xampp, I get this:

    Something is wrong with the XAMPP installation :-(


    This is that file's code:
    Code:
    <?php
    	if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
    		$uri = 'https://';
    	} else {
    		$uri = 'http://';
    	}
    	$uri .= $_SERVER['HTTP_HOST'];
    	header('Location: '.$uri.'/xampp/');
    	exit;
    ?>
    Something is wrong with the XAMPP installation :-(
    I also tried using a file with just this in it: <?php phpinfo(); ?>

    The result was a completely blank page.

    Could someone please offer an opinion on what might be wrong?
    Last edited by Kangaroo32; 12-16-09 at 00:08.

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    ok so it was working then you made some changes then it not longer works
    either unpick the changes you made or consider removing and then reinstalling XAMPP

    bear in mind that changes to the php or apache config require a restart of the apache server
    changes to user account in MySQL require eiother a flush privileges or a restart of the MySQL server

    if this is you first installation then leave the server "as is", get it working first, then you can start tinkering.. but if you do have the urge to tinker document what you do so you can unpick those changes. sometimes you may not see the effect of the changes you made until several changes later. unless you have to make changes to the config files DONT, at least dont untill you are familiar enough to understadn what you are doing and what the symptoms of what you are doing are recognised.
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Dec 2009
    Location
    North America
    Posts
    6
    Sorry, there's a bit of a misunderstanding. Installing it and not doing anything has the result of .php files not working, so I looked for people having similar problems, and tried to duplicate the solutions they found so it would work for me. However, none of that helped. I tried uninstalling and reinstalling, but that did not fix it either.


    Right now I've just uninstalled and reinstalled. I selected a folder for the files to be extracted to, and now I'm in the cmd setup. It says:




    Current directory does not match configured directory.
    I must relocate the XAMPP paths corrently.

    Should I proceed? <y/x=exit setup>: y




    I selected yes, and this is the result:




    relocating XAMPP...
    relocate XAMPP base package
    relocate Apache
    relocate FileZilla FTP Server
    relocate Mercury
    relocate MySQL
    relocate OpenSSL
    relocate Perl
    relocate PHP
    relocate phpMyAdmin
    relocate Sendmail
    relocate Webalizer
    relocate XAMPP Demopage
    relocating XAMPP successful.

    XAMPP is ready to use.

    Press <Return> to continue.




    I then opened the XAMPP Control Panel and started Apache and MySQL.

    When I open D:\xampp\htdocs\index.php I get this:
    Something is wrong with the XAMPP installation :-(

    When I open D:\xampp\htdocs\index.html I get this:
    It works!


    I really want to learn how to set this up properly, and I'm telling you guys everything relevant that I can think of..

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    so it sounds like the PHP install or configuration is banjaxed
    personally whenever setting up XAMPP I've always allowed it do decide where it wants to install, precisley because you are installing so many pieces of software its easy for minor changes made by me tio screw over the installation.

    what XAMPP is supposed to do is to handle the installation for you.. in this case it isn't.

    what you could try doing is try to work out where apache is expecting to find PHP
    you need to check the apache configuration files you may need to check PHP.ini. Im guessign there is a pointer or reference to the wrong directory. unfortuantley I dojn't think anyone here will be able to help you diagnose an XAMPP installation problem.. you are more likely to get help on XAMPP issues on the XAMPP forum

    it coudl be a permissions peroblem, ie the directory where XAMPP or PHP is installed doesn't have the right permissions, although that is more usually an symptom of *NIX installations

    is PHP running as a command line client... with modern PHP installatioins you can run it as a web module or as a standalone command line language. similar in principle to languages like dosbatch or vbscript for hosts vbh.
    I'd rather be riding on the Tiger 800 or the Norton

  8. #8
    Join Date
    Dec 2009
    Location
    North America
    Posts
    6
    Thanks, I'll try there.

  9. #9
    Join Date
    Dec 2009
    Location
    North America
    Posts
    6
    Update!

    It seems the problem was that I was using D:\xampp\htdocs\ for my php files. The solution was to create a new folder inside that directory (for example, D:\xampp\htdocs\test). Everything inside the "test" folder works flawlessly.


    Hopefully this topic can help another who might have a similar problem.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •