Menu

Unable to use after 'successful' installation

eiffel
2008-04-02
2012-09-14
  • eiffel

    eiffel - 2008-04-02

    Dear All,

    I have just downloaded Alloc PSA 1.4.3. I installed it with the installation script, everything went fine, everything was "green": no file permission issue, database connection and creation are OK, etc.
    Then, I try to login and I obtain the following message:


    Unable to connect to database:

    Query failed:
    SELECT * FROM config

    Unable to connect to database:

    Query failed:
    SELECT * FROM config

    Unable to connect to database:

    Query failed:
    SELECT * FROM person

    Unable to connect to database:

    Query failed:
    SELECT * FROM config

    Unable to connect to database:

    Query failed:
    SELECT * FROM person WHERE username = 'alloc' AND personActive = 1


    This appears above the login panel, and no message (even in HTML source) exists for the "Unable to connect to database".
    The installation script was able to connect and to create AllocPSA tables in the database. The user "alloc" is in the database...
    Any idea ??


    PHP Version 4.4.3
    MySQL Server version: 5.0.45

    Thanks,
    Best Regards.

     
    • eiffel

      eiffel - 2008-04-02

      1) Access rights: everybody can read the "alloc_config.php"
      2) Credentials are OK (I have tested with command line, with phpmyadmin, etc.)
      3) The query "SELECT * FROM person" returns the follwing row:

      alloc $P$9EHMkhuY4CSBoej6D8G7mHlToSwQXN. god,admin,manage,employee 1 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL yes 1 NULL

      4) Database is running and accepting connections.

      Unfortunately I have no access to the Web Log ...

       
      • Alex Lance

        Alex Lance - 2008-04-03

        Perhaps it's the database host settings?

        When checking the credentials on the command line with mysql, can you also run it with -h eg:

        mysql -u USERNAME -h HOSTNAME -p DATABASENAME

        HOSTNAME should be set to the same value as in alloc_config.php.

        Other than that, I'm running out of ideas :/

        I suspect that there is crucial information in your web servers logs.

        Might be worthwhile adding this line to the top of the file alloc.php:

        ini_set("display_errors", 1);

        and seeing if the error messages get more verbose.

        If the webserver is publically available and you are comfortable giving me the access information, you can email me privately alex at allocpsa com and I'll take a quick look.

        Cheers,
        Alex Lance
        http://allocPSA.com

         
    • Alex Lance

      Alex Lance - 2008-04-02

      Hi Eiffel,

      Check that the user that owns the webserver process can read the alloc_config.php file.
      A quick way to check if it's a permission problem might be to: chmod a+r alloc_config.php

      Secondly double-check the credentials in the alloc_config.php file. Try using those credentials on the command line to connect to the mysql database: eg:

      mysql -u YOURUSERNAME -p YOURDATABASENAME

      Once logged in run the query:
      SELECT * FROM person;

      make sure that it returns a row.

      Then perhaps check that your database is running and accepting connections.

      Give us a yell if it still not working. The more info you can provide the better. Perhaps check your webservers error logs for more detailed info.

      Cheers,
      Alex Lance
      http://www.allocPSA.com

       
  • X3msnake

    X3msnake - 2012-04-12

    I have the same Issue

    After a good install it just gives me the same error

    PHP Warning: mysql_close(): no MySQL-Link resource supplied in
    /home/x3msnake/public_html/admin/shared/lib/db.inc.php on line 166

    PHP Warning: mysql_connect() : Access denied for user
    'x3msnake_admin'@'localhost' (using password: YES) in
    /home/x3msnake/public_html/admin/shared/lib/db.inc.php on line 52

    PHP Warning: mysql_close(): no MySQL-Link resource supplied in
    /home/x3msnake/public_html/admin/shared/lib/db.inc.php on line 166

    PHP Warning: Cannot modify header information - headers already sent by
    (output started at /home/x3msnake/public_html/admin/shared/lib/db.inc.php:52)
    in /home/x3msnake/public_html/admin/shared/util.inc.php on line 544

    This is what is in the error log

    Its a Linux Server Have wrodpress running on it without problems and it uses a
    similar config file.

    Any Ideas?

    Best Regards

    V.

     
  • X3msnake

    X3msnake - 2012-04-12

    http://3skfreelance.org/admin/login/login.php

    You can see the errors live here.

     
  • Con Zymaris

    Con Zymaris - 2012-04-12

    x3msnake,

    can you specify which versions of PHP & MySQL you have installed?

    -- Con

     
  • Con Zymaris

    Con Zymaris - 2012-04-17

    x3msnake,

    any more news on this issue?

    -- Con

     
  • X3msnake

    X3msnake - 2012-04-18

    Sorry, hadn't recieved the reply update...

    Here it is

    PHP Version --- 5.2.17

    MySql Version --- 5.5.21-cll

    What else do you need? :)

    Best Regards

    V.

     
  • Con Zymaris

    Con Zymaris - 2012-04-24

    x3msnake,

    thanks for the feedback, We will review and respond.

    -- Con

     
  • X3msnake

    X3msnake - 2012-04-24

    Greetings

    I managed to install and run the Program.

    Deleted the config file and ran the tests making sure that the user and pass
    passed the validation.

    Some sub accounts have a prefix like x3msnake_admin and database too
    x3msnake_database, not sure that had anything to do with it.

    I skipped the install DB since it was already installed and created the config
    file with 744 permissions hit install and the software is running.

    If you need some logs tell me what I should post hopefully you can pinpoint
    what has happened. Somehow I think this might be related to the config file
    that didn't had the right permissions the first time, but then again I really
    have no clue.

    Best Regards

    V.

     
  • Con Zymaris

    Con Zymaris - 2012-04-24

    x3msnake,

    The issue issue is most likely that the alloc config file path (root of the
    alloc source tree iirc) isn't writable - the site is showing the setup page
    again, which means it didn't get written out.

    Suggested fix is to make the config path writable/

    The web server needs to be able to write to /home/x3msnake/public_html/admin/
    .

    (It may be that the /var/alloc or wherever tree, which is also required to be
    writable.)

    Hope this helps.

    -- Con

     
  • Con Zymaris

    Con Zymaris - 2012-04-24

    x3msnake,

    The problem appears not to have been the folder permissions, but almost
    certainly the file permissions.

    Is this all fixed and working now for you?

    -- Con

     
  • X3msnake

    X3msnake - 2012-04-24

    Yes, Thank You!

    I'll be sure to post back if i find any other issues.

    Best Regards

    X

     

Anonymous
Anonymous

Add attachments
Cancel





Auth0 Logo