SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: mysql - php

  1. #1
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Hope someone can help .

    First - Mysql
    =============
    I was trying to fill a new mysql database with tables from a .sql file. so I typed:

    mysql MyDB > DB.sql

    But it doesn't work. I'm using plesk and many mysql commands aren't working the usual, also I can't use mysql from anywhere except /usr/local/plesk/mysql/bin , noway to use mysql under other directory..
    also I tried: ./mysql MyDB > DB.sql

    but didn't work too. I tried with user/pass and I tried:
    ./mysqlimport .. but that needs to import a TABLE not a database.

    Any solution you advice please?

    Second - PHP
    ============
    Since I can create, drop, adduser with mysql I didn't setup the phpMyAdmin, but when I got the mysql error above I thought to setup the phpMyAdmin to import databases. but I got :
    "Warning: You haven't enabled magic_quotes_gpc in your PHP configuration"

    I went to my httpsd.conf.def which write to httpsd.conf and added:

    php3_magic_quotes_gpc on

    then I restart apache ... but I still got the same error about magic_quotes_gpc aren't enabled !

    Again, any solution you advice please?


    Thank you ...
    Saeed

    <Edited by A-W on 12-13-2000 at 04:05 PM>

  2. #2
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I believe you need to recompile PHP for the magic quotes to work... Correct me if I am wrong

  3. #3
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This should solve your first problem:

    mysql -u YOURUSERNAME -p YOURPASSWORD MyDB < DB.sql

    As for your second question, I assume since you can edit your Apache config that you can also edit your php.ini file? If so then change the magic quotes setting in the php.ini file.
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  4. #4
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    believe you need to recompile PHP for the magic quotes to work
    Sorry but I'm new to php. what is the meaning of recompile, or how to do it?


    mysql -u YOURUSERNAME -p YOURPASSWORD MyDB < DB.sql
    No, still the error in mysql syntax... I tried with user/pass and without, also with "./" and without, and with "; and /g" and without


    you can also edit your php.ini file
    In the plesk there is not php.ini .. the php conf is the same httpd.conf .. I'm using:

    ### PHP sub-Section

    php3_safe_mode on
    php3_safe_mode_exec_dir "/usr/local/plesk/no_system"
    php3_magic_quotes_gpc on
    #php3_engine off

    ### End PHP sub-Section


    I'm sure that the mysql comes inside plesk, and seems the php is in the same package ... last days when I checked tens of help forums and sites for several issues, and 90% of solutions aren't the same for this plesk thing!

    So, any more advices?

    thank you

  5. #5
    SitePoint Member
    Join Date
    Dec 2000
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you Karl ..

    I still around trying your command and finally i success by adding a ./ and ;
    ps. sometimes I tried it but 'seems an idiot, but true' to use > instead of <

    so it's
    ./mysql -uuser -ppass DB < DB.sql; or/g

    thanks again ..
    still trying around the php. and as usual I'm sure that I will discover later that the problem is easy and caused by myself!


Bookmarks

Posting Permissions

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