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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Help Making my WAMP php webisite live?

  • 20-03-2011 3:32pm
    #1
    Registered Users, Registered Users 2 Posts: 378 ✭✭


    Hi guys

    I need some help please :)

    I have uploaded my PHP website (created using WAMP server locally) to webworld.ie but I cannot get my login to work

    My website index.php file loads, and you can register a new user (can see the new user populating into mySQL db)

    However, when I try to login, nothing happens, it looks like my $_Session is not being carried over

    Its works perfecly locally, but not after transfering my files online

    this is the start of my header.php file that is called on every single PHP page

    session_start();
    require_once ('db_connect.inc.php'); // include the database connection
    require_once ("functions.inc.php"); // include all the functions

    but this code in my other pages is not resulting in the username being passed:

    $u = $_SESSION;

    Am I missing something on my webserver?

    Do I need to also upload (and change) the php.ini file?

    As I say it works perfectly locally, just not online and I can also confirm mySQL DB is working fine online because I can register a new user on my site and see that user in the DB

    Any help would be greatly appreciated

    Many thanks in advance


Comments

  • Registered Users, Registered Users 2 Posts: 894 ✭✭✭Dale Parish


    Test to see what the problem is by trying to print your username/password from the query you checked against user input


  • Registered Users, Registered Users 2 Posts: 378 ✭✭bob2oo7


    Hi

    Thanks for the reply

    I have already tried printing the username but it is blank

    I think the issue lies with the session.save_path in the php.ini file

    I'm using a shared web hosting option and I fear I need to move to a dedicated server so I have full access to this file

    I have asked webworld to change this path for me, hopefully they cab do that for me to save me having the extra expense of a dedicated server


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    bob2oo7 wrote: »
    Hi

    Thanks for the reply

    I have already tried printing the username but it is blank

    I think the issue lies with the session.save_path in the php.ini file

    I'm using a shared web hosting option and I fear I need to move to a dedicated server so I have full access to this file

    I have asked webworld to change this path for me, hopefully they cab do that for me to save me having the extra expense of a dedicated server
    I had this problem too with moving to a host.

    You could try adding this to your htaccess file in your site's root directory if you are on Apache hosting:

    php_value session.save_path '/home/pathtomyaccount/tmp/'


  • Registered Users, Registered Users 2 Posts: 378 ✭✭bob2oo7


    Thanks web monkey

    I don't have that file in my root so I cannot do as you suggested

    I'm still waiting for webworld to come back to me on the php.ini file

    Hopefully I get it sorted and my website live as soon as possible


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    bob2oo7 wrote: »
    Thanks web monkey

    I don't have that file in my root so I cannot do as you suggested

    I'm still waiting for webworld to come back to me on the php.ini file

    Hopefully I get it sorted and my website live as soon as possible
    You can create the file yourself in many cases and it would get executed. May have to enable it in your control panel however. I'm surprized the hosting company haven't got back yet.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 378 ✭✭bob2oo7


    I have uploaded a copy of my local php.ini file and changed the session save path to a tmp folder I created in my wwwRoot directory but it still isn't working

    I have asked for an update this morning on my support ticket, a little bit annoying as I'm so close to the finish line


  • Registered Users, Registered Users 2 Posts: 9,579 ✭✭✭Webmonkey


    no no, not php.ini.

    Create a .htaccess file with the following contents
    php_value session.save_path '/home/pathtomyaccount/tmp/'
    

    Obviously you must put in a correct path that is a writeable directory on your account.

    But this all depends how your hosting account is set up. It may not even be an apache server! Though the chances are it is.


  • Registered Users, Registered Users 2 Posts: 378 ✭✭bob2oo7


    No joy I'm afraid

    Thanks for all the help so far


Advertisement