1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Php or MySQL problem? Not sure! New to this....

Discussion in 'PHP' started by FanAddict, Aug 27, 2006.

  1. #1
    Hi everyone,
    I will try my hardest to explain my problem... the only thing i know about MYSQL is to make a database, and add a user in cPanel.

    okay....
    I am using a script, where users must activate their account, this is the email they are receiving:



    Dear test,

    To complete your registration, click on the link below:
    http://localhost/index.php?file=verifyreg&c=886644

    Thanks very much,

    http://localhost



    As you can see the websites URL is showing up as localhost.

    Any idea's on what this could be?

    Thanks all in advance!
    Linda.
     
    FanAddict, Aug 27, 2006 IP
  2. petronel

    petronel Peon

    Messages:
    113
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    seems to be some configuration problem in the script
    is the script installed on localhost? or a domain ?
     
    petronel, Aug 27, 2006 IP
  3. FanAddict

    FanAddict Notable Member

    Messages:
    7,017
    Likes Received:
    376
    Best Answers:
    0
    Trophy Points:
    230
    #3
    It's installed on my hosting plan on a "addon domain" Im not to sure if that's what you meant? :) I tried :D
     
    FanAddict, Aug 27, 2006 IP
  4. dotcomguy

    dotcomguy Peon

    Messages:
    824
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I also think it could be a config issue.

    simply make the URL to the absolute URL path,
     
    dotcomguy, Aug 27, 2006 IP
  5. FanAddict

    FanAddict Notable Member

    Messages:
    7,017
    Likes Received:
    376
    Best Answers:
    0
    Trophy Points:
    230
    #5
    That's the problem, this is all that's in the config.php file, the rest was a MySQL copy and paste job :)


    <?php
    //Database Connection Details

    $dbhost="localhost";//Database Hostname
    $dbuser="****";//Database user name
    $dbname="****";//Database name
    $dbpass="****";//Database password
    $prefix="yp_";



    //Normal Settings
    $approve=1;/* set this 0 if you dont want user to add/update listing withought admin checking */
    $mail=1;/* set to 0 if u don't want to send email when listing is approved.*/
    $logomaxwidth=200;
    $logomaxheight=200;
    $logomaxsize=50000;//50 KB
    $maxchar=1000;// Maximum character in listing description

    //Google Code
    //Put your google add here.
    //If you remove it , it display banner

    $google=<<<GOOGLE
    <script type="text/javascript"><!--
    google_ad_client = "pub-2898012231294796";
    google_ad_width = 728;
    google_ad_height = 90;
    google_ad_format = "728x90_as";
    google_ad_type = "text";
    google_ad_channel ="1936339871";
    google_color_border = "CC0000";
    google_color_bg = "FFFFFF";
    google_color_link = "CC0000";
    google_color_text = "000000";
    google_color_url = "000000";
    //--></script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    <br>
    GOOGLE;


    ?>
     
    FanAddict, Aug 27, 2006 IP
  6. nita_nitd

    nita_nitd Active Member

    Messages:
    154
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #6
    check the script used to send the mail,, chnage the path thr... make it an absolute URL... the config looks ok.
     
    nita_nitd, Aug 27, 2006 IP
  7. petronel

    petronel Peon

    Messages:
    113
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #7
    can you contact me on MSN ? i'll try to help you.
     
    petronel, Aug 27, 2006 IP
  8. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #8
    If I had to guess, I'd bet someone tried to make a url using the $dbhost variable.
     
    noppid, Aug 27, 2006 IP
  9. FanAddict

    FanAddict Notable Member

    Messages:
    7,017
    Likes Received:
    376
    Best Answers:
    0
    Trophy Points:
    230
    #9

    I don't have any idea how to do that, lol... im such a newb :)
     
    FanAddict, Aug 27, 2006 IP
  10. FanAddict

    FanAddict Notable Member

    Messages:
    7,017
    Likes Received:
    376
    Best Answers:
    0
    Trophy Points:
    230
    #10
    Added :) Thank you.
     
    FanAddict, Aug 27, 2006 IP
  11. petronel

    petronel Peon

    Messages:
    113
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #11
    problem solved.
     
    petronel, Aug 27, 2006 IP
    FanAddict likes this.
  12. nita_nitd

    nita_nitd Active Member

    Messages:
    154
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #12
    good to know that... but what was the problem
     
    nita_nitd, Aug 28, 2006 IP
  13. petronel

    petronel Peon

    Messages:
    113
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #13
    site settings was saved to database, and some was wrong.
     
    petronel, Aug 28, 2006 IP
  14. nita_nitd

    nita_nitd Active Member

    Messages:
    154
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #14
    ohk.. thanks for the input ...
    hope u ll also solve my probelm if ever i come across something :)
     
    nita_nitd, Aug 28, 2006 IP