Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

php & mysql help

  • 23-10-2003 06:46PM
    #1
    Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭


    Hi guys,
    I'm experimenting with setting up a web server with mysql and php4 support.

    I've got mysql,php and apache up and running on a linux machine.

    A friend has given me some basic code to start building my web-site. What he has given me is:

    -two php files
    -an INC file
    -an Sql file

    now I know the two php files, go in the public_html directory, but what do I do with the INC file and the SQL file???


    Please advise,

    Thanks,
    king :)


Comments

  • Registered Users, Registered Users 2 Posts: 8,488 ✭✭✭Goodshape


    the .sql file is probobly a set of database instructions.

    If you don't already have something like phpMyAdmin, you should get it. (www.phpmyadmin.net). It's handy for keeping your database in order.

    Once that's set up, you can import the .sql file into phpMyAdmin, and thus your database is created.

    The .inc file sounds like an include file for a webpage. I could be wrong, but look through the php files and see if they reference it anywhere (like include("file.inc") ).


  • Registered Users, Registered Users 2 Posts: 112 ✭✭quinta


    You will also need to add the php module to your httpd.conf file otherwise Apache won't recognise the file type. PHP will have to be built with mysql support and apxs. If you go to php.net and do a search in documentation for Apache you will find detailed compilation and build instructions. Your inc files would usually go into a subdirectory under your main html directory called inc.


  • Registered Users, Registered Users 2 Posts: 112 ✭✭quinta


    btw your sql file is a load of database tables and data which can be imported by doing the folliwng

    # mysqladmin create new_database -p

    go to the directory where the sql file is.

    # mysql new_database < whatever.sql -p




    * -p is to supply the password


Advertisement