Menu

n00b needing setup help

Help
westy808
2007-10-17
2012-07-05
  • westy808

    westy808 - 2007-10-17

    I'm very green with DBs but would like to give this a go.
    Assuming my username is 'homer', my password is 'duff', a blank schema called 'myfeta' has been set up, and this is a MySql 5.0 database on a Windows XP Pro machine with IIS... what exactly do I put in the MySQL Command Line Client?

    mysql> ...?

    I have tried several times, no luck. Please help, thanks.

    ps. I would like to have my feta files in my wwwroot directory in a folder called feta. I have them in the root directory, but would like to have them in sub folder called feta.

     
    • Gwyn Ciesla

      Gwyn Ciesla - 2007-10-18

      Excellent! Hope it meets your needs. If you think of any new features you'd like to see, drop a line.

      No problem, that's why they pay me the big. . .never mind. :)

       
    • Gwyn Ciesla

      Gwyn Ciesla - 2007-10-17

      In theory, you should be able to 'mysql -u homer -p duff myfeta < feta.sql' from the folder with feta.sql in it. Then if your config.php should have siteaddress as http://hostname/feta, and move the files to wwwroot/feta, set the db credential in config.php, and you should be set.

       
    • westy808

      westy808 - 2007-10-17

      Thank you for the prompt help! That clarified it perfectly. But I still need help. Doing that, the feta.sql seemed to launch - the cmd window scrolled through a bunch of settings. Looking at the myfeta schema from the MySQL Admin GUI - it appeared that there was no change, no tables created. I went ahead updated the info in the config.php file then launched the site. It appears that no variables are being passed, the page is full of code in all areas, then when it auto-refreshes... it can not find the site. The variable $sitetitle isn't even being passed, and that is one of the items in the config.php file.

       
    • Gwyn Ciesla

      Gwyn Ciesla - 2007-10-18

      Not sure quite what the MySQL problem is. You may be able to import the tables, etc, with the MySQL admin GUI. Look for an option to run an sql script, something like that. I use the command line tools for Linux and phpmyadmin, so YMMV.

      As far as the PHP part is concerned, it sounds like you don't have PHP set up correctly for your web server. IIS, no? I've set up PHP for IIS, but it's been a long time. If PHP were set up correctly, even with a blank DB, you'd see a login box and a logo, not code. I recommend the docs on php.net, they're very complete: http://www.php.net/manual/en/install.windows.php

      If you get past these two hurdles and it still doesn't work, or you have questions with the hurdles themselves, let me know.

       
    • westy808

      westy808 - 2007-10-18

      Yup, figured the PHP should work regardless. And it does, but I had to add 'php' after '<?' in the index.php file just above the [echo "<body onload=\&quot;box_onload();\&quot;>";] line.

      I haven't had any luck fixing the mySQL problem yet. I will post when I find where I went wrong with that as well.

      I get the following errors below the login box now though. I figure most of them will be fixed with the mysql problem? But the first ones involving sessions has me wondering still. I use PHP for sessions for our website, which I developed locally on my machine... so again, I think the PHP install is fine?

      InfoPHP Warning: session_start() [function.session-start]: open(C:\DOCUME~1\john\LOCALS~1\Temp\php\upload\sess_07dhe9f3pog49rcc9efap1hdq4, O_RDWR) failed: No such file or directory (2) in C:\Inetpub\wwwroot\feta\index.php on line 22 PHP Notice: Undefined index: logout in C:\Inetpub\wwwroot\feta\index.php on line 46 PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Inetpub\wwwroot\feta\functionlib.php on line 32 PHP Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in C:\Inetpub\wwwroot\feta\functionlib.php on line 46 PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Inetpub\wwwroot\feta\functionlib.php on line 32 PHP Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in C:\Inetpub\wwwroot\feta\functionlib.php on line 46 PHP Warning: Unknown: open(C:\DOCUME~1\john\LOCALS~1\Temp\php\upload\sess_07dhe9f3pog49rcc9efap1hdq4, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\DOCUME~1\john\LOCALS~1\Temp\php\upload) in Unknown on line 0

       
    • Gwyn Ciesla

      Gwyn Ciesla - 2007-10-18

      Well, some of those are clearly due to the DB not being set up correctly, but others are totally new to me. Looks like possibly a permissions issue? What versions of things are you running, OS, Webserver, PHP, etc?

       
    • westy808

      westy808 - 2007-10-18

      Windows XP service pack 2 -- all the updates as they come
      IIS installed
      PHP 5.2
      mySQL 5 (which does work with other appz)

      As for permissions, I have the wwwroot folder set to 'Full Control' for user 'Everyone' and just re-applied these settings to 'Replace permission entries on all child objects' so that this setting trickles down.

       
    • Gwyn Ciesla

      Gwyn Ciesla - 2007-10-18

      Ah, security nice and tight. :)

      In all seriousness, I'd think that would work. If PHP is working for you then you should be set. I have heard accounts where there were extraneous error messages in this and some of my other PHP apps when run on some PHP setups, where the setting to show all warnings is enabled. This is actually a security risk and should not be set in a production environment. I develop on Fedora, and it's off by default there. I'd say once you get the mysql DB working, you'll be set. I'd recommend phpmyadmin, it's GPL and I've yet to find anything it doesn't do.

      Sorry I'm not being more help, I just use Linux/Apache most of the time, as it Just Works.

       
    • westy808

      westy808 - 2007-10-18

      yeah, security what? I'm on a closed network behind a firewall, and really, nobody on another machine will be poking around.

      I got the session errors gone. n00b mistake, I needed to update where session temp files were saved in the php.ini file. Had done that before, but forgot to re-do it when I re-installed some extensions missing.

      I took your advise, got phpMyAdmin installed. That had some additional steps as well, but went fairly smooth. From this app, will I be able to run your script directly to initially setup my 'myfeta' schema in my database? I have connected successfully to my mySQL database and can view my schemas from phpMyAdmin... I see some options...

       
    • Gwyn Ciesla

      Gwyn Ciesla - 2007-10-18

      I figured as much. Not much call to make Feta world-available, I'd imagine.

      Good! Glad that worked!

      As far as the sql part, you select the empty DB on the left side, then up at the top, select Import, Browse for the feta.sql, and Go. Should work.

       
    • westy808

      westy808 - 2007-10-18

      VICTORY! Now I can get rid of my chicken scratch notebook and keep actual records of our machines!

      Thanks for your help and quick responses. Seriously, most don't help newbies like me out much.

       

Log in to post a comment.