php not connecting to mysql

Discussion in 'PHP' started by martinvidic, Jan 29, 2012.

  1. #1
    HI !

    I just moved my sited to a dedicated server. Most parts of the site work fine, but I'm having trouble with php.
    It looks like the problem is somewhere between this:

    @session_start();
    @ob_start();
    require("connect.php");

    and the php.ini file.

    What I'm testing right now is this:
    I have a log in page which a username and password form action="db/auth.php
    When I use this login form, I can connect to my database for a MOMENT. It checks my user name in the db and then logs in.
    But after that, no information is loaded from the database.

    When I modify db/auth.php so that the password and username are already in the code, and then go to db/auth.php, it doesnt work.
    I will always have to go through my login page. (with method="post" action="db/auth.php...)

    No matter where i go after db/auth.php, it doesn't connect normally.

    Does anybody know what I have to look for - or how to fix this?

    Thanx
    Martin
     
    martinvidic, Jan 29, 2012 IP
  2. uxiim

    uxiim Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Can you post your code here...?
     
    uxiim, Jan 30, 2012 IP
  3. martinvidic

    martinvidic Guest

    Messages:
    182
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    found the problem :)
    It was in the php.ini file

    ...was using <? ?> instead of <?php
     
    martinvidic, Jan 30, 2012 IP