+ Post New Thread
Page 3 of 3 FirstFirst 123
Results 31 to 45 of 45
Web Development Thread, using mysql & php on a W2K SP2 server in Coding and Web Development; or just type 'sudo cp -r /directory /var/www/directory'...
  1. #31

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,590
    Thank Post
    109
    Thanked 762 Times in 593 Posts
    Rep Power
    180

    Re: using mysql & php on a W2K SP2 server

    or just type 'sudo cp -r /directory /var/www/directory'

  2. #32

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: using mysql & php on a W2K SP2 server

    Code:
    sudo su
    No! Never do that! It breaks stuff. Plus you don't get warnings anymore.

  3. #33

    beeswax's Avatar
    Join Date
    Jul 2005
    Location
    England
    Posts
    2,285
    Thank Post
    285
    Thanked 225 Times in 153 Posts
    Rep Power
    131

    Re: using mysql & php on a W2K SP2 server

    so how does that apply when you're using a gui (ubuntu)?

  4. #34

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,400
    Thank Post
    636
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319

    Re: using mysql & php on a W2K SP2 server

    You can run the apps from a terminal using sudo; or for Ubuntu: you can use the Run Program menu and type gksu your-app-here.

  5. #35


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339

    Re: using mysql & php on a W2K SP2 server

    No! Never do that! It breaks stuff. Plus you don't get warnings anymore.
    can you give more detail please, I am unaware sudo su caused problems on ubuntu/macs

  6. #36

    beeswax's Avatar
    Join Date
    Jul 2005
    Location
    England
    Posts
    2,285
    Thank Post
    285
    Thanked 225 Times in 153 Posts
    Rep Power
    131

    Re: using mysql & php on a W2K SP2 server

    Quote Originally Posted by webman
    You can run the apps from a terminal using sudo; or for Ubuntu: you can use the Run Program menu and type gksu your-app-here.
    I don't know if you've got the full picture webman. I'm trying to set up a LAMP server using Dapper, I've limited time, and I'm happier working with a gui front end, hence ubuntu. In trying to transfer the files for the school's website into /var/www (it is the place to put these files, isn't it?) I get a popup telling me I haven't permission to do this. I assume, in command line, that the sudo bit of code is to move me up to the level of admin. My problem is how to do this through ubuntu. How do I log on as admin?
    Next job is to figure out how to set up a database.
    thanks for the time and patience.

  7. #37
    Joedetic's Avatar
    Join Date
    Jan 2006
    Location
    Walsall
    Posts
    1,316
    Thank Post
    6
    Thanked 13 Times in 13 Posts
    Rep Power
    22

    Re: using mysql & php on a W2K SP2 server

    You cant login as admin. You have to type sudo then the command. And then the password for your user.

    If you can install proftp (sudo apt-get install proftpd) and set that up to FTP your files accross to a folder in your home directory.

    Then do

    cd ~

    on the server. That'll take you to your home directory. Next you need to do

    sudo cp -r (name of the folder you put the files in) /var/www

    That'll move the contents of that folder to the www folder.


    I'm doing the same as you this week with installing an ubuntu dapper LAMP server but to install a butchered up MRBS to be a resource booking system. So i've had to do similar stuff.

    Anyway, i hope that's all correct...i'm sure someone will be able to correct me (i'm looking at you webman!)

  8. #38

    beeswax's Avatar
    Join Date
    Jul 2005
    Location
    England
    Posts
    2,285
    Thank Post
    285
    Thanked 225 Times in 153 Posts
    Rep Power
    131

    Re: using mysql & php on a W2K SP2 server

    I was impressed with the ease of installing the Dapper LAMP server. I didn't time it, but reckon it took around 20 minutes. but as far as linux is concerned I've still got on my water wings and rubber ring. apart from some basic ms-dos some years ago I'm afraid i've done everything via a gui.
    When I get round to sorting out a staff intranet i'm going to use W2K3 server and the free Sharepoint as that's got a room/resource booking add-on as well as a help desk. Though I hope to use the Dapper server for the school website and pupil intranet.

  9. #39


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339

    Re: using mysql & php on a W2K SP2 server

    by coincidence I found out that hte ubuntu root account can be enabled by
    sudo passwd root
    provided ssh allows root logins you could use sftp to upload files (with a gui)
    TBH gui's are really for desktops and are an unnecessary overhead on servers.

  10. #40

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,400
    Thank Post
    636
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319

    Re: using mysql & php on a W2K SP2 server

    Hi beeswax, sorry yes I didn't read it all. Alt+F2 to get your "Run program" box up, or make a shortcut to this:

    gksu nautilus /var/www

    When ran, it will prompt you for your admin password (in a similar vein as Synaptic and other system administration utils) and launch the file browser with priviliges to write to /var/www :-)

  11. #41

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,802
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224

    Re: using mysql & php on a W2K SP2 server

    Quote Originally Posted by CyberNerd
    No! Never do that! It breaks stuff. Plus you don't get warnings anymore.
    can you give more detail please, I am unaware sudo su caused problems on ubuntu/macs
    Your enviroment is setup as your unprivledged user. Your shell is running with root priveledges. This results in lots of your config files in your home directory being owned by root and unreadable/unwriteable by your normal user account.

  12. #42

    beeswax's Avatar
    Join Date
    Jul 2005
    Location
    England
    Posts
    2,285
    Thank Post
    285
    Thanked 225 Times in 153 Posts
    Rep Power
    131

    Re: using mysql & php on a W2K SP2 server

    Quote Originally Posted by webman
    Hi beeswax, sorry yes I didn't read it all. Alt+F2 to get your "Run program" box up, or make a shortcut to this:

    gksu nautilus /var/www

    When ran, it will prompt you for your admin password (in a similar vein as Synaptic and other system administration utils) and launch the file browser with priviliges to write to /var/www :-)
    thanks webman. I have trouble getting letters (no prob with numbers) in the right order so spent a happy 5 mins trying to get gsku... to work. Now how do I set up a database?

  13. #43

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,400
    Thank Post
    636
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    319

    Re: using mysql & php on a W2K SP2 server

    Right bare with me, from memory...

    Ok, if you haven't already, you'll need to set a root password for mysql:

    Code:
    $ mysqladmin -u root password <your_pass>
    Replace <your_pass> with a strong password of your choice.

    Now we need to create a new database and add another mysql user who can access it.

    Code:
    $ mysql -u root -p
    This will load the mysql client and login as the root user and prompt you for the password (the one you just made in the previous step)

    Create the new database:

    Code:
    mysql> create database cmstest;
    You can replace "cmstest" with the name of the CMS you want to install. You should receive the message Query OK - the database has been made.

    Now lets make a new user that is allowed to connect to this database only (Bad idea having root login to your mysql database from your scripts).

    All one line:.

    Code:
    mysql> grant all privileges on cmtest.* to 'cms_user'@'localhost' identified by 'cmspass';
    (One again, change "cmstest" to whatever name you gave to your database. You can also use any username you like.)

    You can now log out of mysql by typing exit.

  14. #44
    Joedetic's Avatar
    Join Date
    Jan 2006
    Location
    Walsall
    Posts
    1,316
    Thank Post
    6
    Thanked 13 Times in 13 Posts
    Rep Power
    22

    Re: using mysql & php on a W2K SP2 server

    Or you could go to the terminal and type

    sudo apt-get install mysql-admin

    If i've remembered that to be the right package that'll install the GUI for administration of the local MySQL server.

    Go to catalogues and add the database (schema) then go to the user administration section and add in the database access user and set the privilages you want.

  15. #45

    beeswax's Avatar
    Join Date
    Jul 2005
    Location
    England
    Posts
    2,285
    Thank Post
    285
    Thanked 225 Times in 153 Posts
    Rep Power
    131

    Re: using mysql & php on a W2K SP2 server

    @Webman: when I type in the first code you give I get "syntax error near unexpected token 'newline'"

    @ Joedetic: I hate to be a pain but when you say, "go to catalogues" where is that? I've done what I hope is a search and can't locate it.

    sad to say that I woke at 4:27 (ah, digital clocks) with this churning through my mind. I couldn't wait to get in to work!

SHARE:
+ Post New Thread
Page 3 of 3 FirstFirst 123

Similar Threads

  1. OS X Server MySQL default installation
    By HodgeHi in forum *nix
    Replies: 2
    Last Post: 30th May 2008, 02:37 PM
  2. MYSQL Help
    By danIT in forum General Chat
    Replies: 2
    Last Post: 18th December 2007, 09:52 PM
  3. SiteAtSchool / IIS / PHP / MySQL / Server 2003
    By OutToLunch in forum Windows
    Replies: 4
    Last Post: 5th February 2007, 02:19 PM
  4. Access DB to MySQL
    By Gatt in forum Web Development
    Replies: 3
    Last Post: 29th November 2006, 10:32 PM
  5. php MySql
    By iking in forum Books and Manuals
    Replies: 0
    Last Post: 11th July 2005, 03:35 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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