As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

PHP and MySQL help

ChrispyChrispy Registered User regular
edited May 2008 in Help / Advice Forum
Hoping you guys can help me here. Let me set this up.

For my one class in college we needed to make a book store website (think Amazon.com). We had to use php and MySQL to get it working. I knew nothing of PHP and MySQL prior to this and had a friend set it up for me on my laptop. Since I didn't have a server, it was all done on my laptop and it was all good. He downloaded PHP Editor and Apache (not sure which version, probably the latest.) I installed both in the same random (not random, but it doesn't matter to the story) folder and everything was fine. Running Apache started up my browser and took me to http://localhost/ the editor worked with it. I made databases and everything was great.

Skip to now. The business I work for recently made a website and my friend (Taximes) and I are in charge of getting it all together. Well I want to use databases because of how much easier it would make things. My friend got the page up and running on his server on the FTP that's on this computer. So I installed the same php editor and the same apache on the computer. But, it's not connecting to http://localhost/ or http://localhost/phpmyadmin/. When I start up apache, it's giving me a "syntax error on line 61 of c:../../../apache/conf/httpd.conf: ServerRoot must be a valid directory". I don't know why because I set it up the exact same way as it's set up on my laptop (in fact it's the exact same since I used the same install files). I don't know how to fix this. Help!


Another thing: when I get it to work, how exactly do I mess what I do with apache with what's already been done? Do I put all the file that I have into the www/public folder in apache then upload it? The site is currently live and I don't want to screw anything up.

~ Make life how you want it ~
Chrispy on

Posts

  • Options
    DaenrisDaenris Registered User regular
    edited May 2008
    Well, what is the value of ServerRoot on line 61 of your httpd.conf file? And does that location actually exist on your computer?

    Is it possible for you to get access to the work server now and just set up a new directory to set up your stuff in while you're working on it? Then you can just move it to the main directory when it's complete and ready to go live.

    Daenris on
  • Options
    ChrispyChrispy Registered User regular
    edited May 2008
    I can't open the file because it's a .conf file. I have no idea what to use to view/edit that. Why is there a problem though in the first place? It would have needed to install incorrectly because it's giving me the error on intial start up after install. I installed it just like I did on my laptop, the only difference is the computer.

    Chrispy on
    ~ Make life how you want it ~
  • Options
    bowenbowen How you doin'? Registered User regular
    edited May 2008
    Chrispy wrote: »
    I can't open the file because it's a .conf file. I have no idea what to use to view/edit that. Why is there a problem though in the first place? It would have needed to install incorrectly because it's giving me the error on intial start up after install. I installed it just like I did on my laptop, the only difference is the computer.

    Notepad.

    bowen on
    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    ChrispyChrispy Registered User regular
    edited May 2008
    Looking at it gives me a headache. I have no idea where line 61 is, because it appears to be all on one line.

    Chrispy on
    ~ Make life how you want it ~
  • Options
    DaenrisDaenris Registered User regular
    edited May 2008
    Open in Wordpad then

    Daenris on
  • Options
    CmdPromptCmdPrompt Registered User regular
    edited May 2008
    Get a better notepad! or just try opening it with WordPad, or possibly enable Word Wrap under Format (maybe).

    Also, I would strongly, strongly recommend you learn to use a MVC like CodeIgniter to make things a billion times easier. If you do, make sure you watch the video tutorials after reading the user guide.

    CmdPrompt on
    GxewS.png
  • Options
    ChrispyChrispy Registered User regular
    edited May 2008
    Vista doesn't have wordpad?

    Chrispy on
    ~ Make life how you want it ~
  • Options
    virgilsammsvirgilsamms Registered User regular
    edited May 2008
    To do this you're going to need a couple of things, firstly a good text editor, like Notepad++ or something, google free text editors for some examples. Most configuration files are text and can be edited even though they might have weird extensions. Secondly, this kind of problem will come up often so you're probably going to have to learn the basics of how it all works. It's all out there, apache, php and mysql all have good documentation so there is a good place to start. I find googling for the non dynamic parts of error messages often turns up knowledge base articles or message boards full of people who have had the same problem.

    virgilsamms on
  • Options
    ChrispyChrispy Registered User regular
    edited May 2008
    Got it. I think it had something to do with my file names. Thanks everyone.

    Chrispy on
    ~ Make life how you want it ~
  • Options
    ChrispyChrispy Registered User regular
    edited May 2008
    Sorry for DP, but I have no choice. I was able to get the myphpadmin to work, but I'm not sure how to get the multiple databases onto my server, help. If this doesn't get a responce I'll start a new thread.

    Chrispy on
    ~ Make life how you want it ~
  • Options
    DaenrisDaenris Registered User regular
    edited May 2008
    Well... have you tried the Create Database option from the home page of phpMyAdmin? If so, what is the error that it gives you?

    Daenris on
Sign In or Register to comment.