Strange PHP problem

Help
Rax
2008-05-29
2013-05-28
  • Rax

    Rax - 2008-05-29

    Hi all,

    I'm new to refbase and am just installing it locally to test it out as an organisational ref manager.

    I've installed everything according to the instructions, but have this issue.

    If I point my browser to http://127.0.0.1/refbase-0.9.0/install.php then I can see the page. However, if I try http://127.0.0.1/refbase-0.9.0/index.php or http://127.0.0.1/refbase-0.9.0/ I just get a blank page. This same is true for all other PHP files except install.php.

    The refbase directory is owned by me but /var/www is owned by root. If I just browse to localhost I see a directory listing.

    Any ideas why the other PHP files don't load?

    Thanks
    Rax

     
    • Rax

      Rax - 2008-05-29

      I should probably have said, the platform is as follows:

      Ubuntu Gutsy 7.10
      Apache 2.2
      PHP5
      MySQL 5

       
      • Richard Karnesky

        It does work fine on that platform.  Let me know if you need any specific configuration files, but I think enabling PHP error reporting is the first thing you need to do.

        We don't yet have debs & I'm not packaging expert.  Others have made rpms, though I haven't checked to see if 'alien' successfully converts these or not.

        We do have a (274 MB download, maybe 1 GB install) virtual machine image of Ubuntu (Hardy server) with refbase on it:
          http://arc.nucapt.northwestern.edu/~karnesky/mediawiki_and_refbase.7z

         
    • Richard Karnesky

      Did you run install.php successfully?  You might try to use 'update.php' (it shouldn't do anything bad if you "rerun" it).

      Are all of the PHP files and directories readable and traversable by the account that apache is run under?

      Do you have access to server logs and/or can you enable more error/warning reporting?

       
    • Matthias Steffens

      Hi rax,

      > I've installed everything according to the instructions

      As Rick notes, please verify (using your MySQL command line interpreter, or a tool such as phpMyAdmin) that the refbase tables were actually installed successfully.

      Usually, the issue you're describing happens if the refbase tables have NOT yet been installed. If you somehow cannot use 'install.php' to successfully install the refbase tables, then you might want to try a manual installation instead:

      http://wiki.refbase.net/index.php/Manual_installation

      In short, you can copy the entire contents of the 'install.sql' file into the SQL command entry form provided by MySQL web administration tools such as phpMyAdmin.

      HTH, Matthias

       
    • Rax

      Rax - 2008-05-29

      I don't think install.php runs successfully. I can execute it,but it then just displays a blank page. The same for update.php. BTW I created the database and user manually because I was having these issues.

      It seems traversable and readable (when I su-ed to www-data).

      These are the last few lines of access.log:
      127.0.0.1 - - [29/May/2008:16:17:57 +0200] "GET /refbase-0.9.0/update.php HTTP/1.1" 200 5175 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"
      127.0.0.1 - - [29/May/2008:16:18:01 +0200] "GET /refbase-0.9.0/install.php HTTP/1.1" 200 7266 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"
      127.0.0.1 - - [29/May/2008:16:18:10 +0200] "POST /refbase-0.9.0/install.php HTTP/1.1" 200 - "http://127.0.0.1/refbase-0.9.0/install.php" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"
      127.0.0.1 - - [29/May/2008:16:22:20 +0200] "GET /refbase-0.9.0/index.php HTTP/1.1" 200 - "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14"

      And these are the last few of error.log:

      [Thu May 29 15:19:16 2008] [alert] [client 127.0.0.1] /var/www/refbase-0.9.0/.ht
      access: AllowOverride not allowed here
      [Thu May 29 15:33:59 2008] [notice] caught SIGWINCH, shutting down gracefully
      [Thu May 29 15:33:59 2008] [error] (9)Bad file descriptor: apr_socket_accept: (c
      lient socket)
      [Thu May 29 15:33:59 2008] [error] (9)Bad file descriptor: apr_socket_accept: (c
      lient socket)
      [Thu May 29 15:33:59 2008] [error] (9)Bad file descriptor: apr_socket_accept: (c
      lient socket)
      [Thu May 29 15:33:59 2008] [error] (9)Bad file descriptor: apr_socket_accept: (c
      lient socket)
      [Thu May 29 15:33:59 2008] [error] (9)Bad file descriptor: apr_socket_accept: (c
      lient socket)
      [Thu May 29 15:34:10 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.3 c
      onfigured -- resuming normal operations
      [Thu May 29 15:34:13 2008] [error] [client 127.0.0.1] Directory index forbidden
      by Options directive: /var/www/
      [Thu May 29 15:34:35 2008] [notice] caught SIGWINCH, shutting down gracefully
      [Thu May 29 15:34:35 2008] [error] (9)Bad file descriptor: apr_socket_accept: (c
      lient socket)
      [Thu May 29 15:34:35 2008] [error] (9)Bad file descriptor: apr_socket_accept: (c
      lient socket)
      [Thu May 29 15:34:35 2008] [error] (9)Bad file descriptor: apr_socket_accept: (c
      lient socket)
      [Thu May 29 15:34:35 2008] [error] (9)Bad file descriptor: apr_socket_accept: (c
      lient socket)
      [Thu May 29 15:34:35 2008] [error] (9)Bad file descriptor: apr_socket_accept: (c
      lient socket)
      [Thu May 29 15:34:45 2008] [notice] Apache/2.2.4 (Ubuntu) PHP/5.2.3-1ubuntu6.3 c
      onfigured -- resuming normal operations
      [Thu May 29 15:46:48 2008] [error] [client 127.0.0.1] File does not exist: /var/
      www/favicon.ico

      But the times on those errors is quite a bit earlier than the time on the access.log.

      Rax

       
    • Rax

      Rax - 2008-05-29

      These are the tables in the refbase database (that I created manually, with the install.sql script):
      +------------------+
      | table_name       |
      +------------------+
      | auth             |
      | deleted          |
      | depends          |
      | formats          |
      | languages        |
      | queries          |
      | refs             |
      | styles           |
      | types            |
      | user_data        |
      | user_formats     |
      | user_options     |
      | user_permissions |
      | user_styles      |
      | user_types       |
      | users            |
      +------------------+

       
    • Rax

      Rax - 2008-05-30

      Thanks all for the input. Unfortunately I get the same logs even with php error reporting on in my php.ini and in the .htaccess file.

      I might give the VM a try, but will have to download it a bit later.

      Cheers
      Rax

       
      • Richard Karnesky

        I find that very surprising.  You might post a php script that intentionally has an error to check your logging.

        Also:  feel free to email your phpinfo results to one or both of us.

         
    • Rax

      Rax - 2008-06-02

      I altered my test.php script with an erroneous function and get the following in my log:

      [Mon Jun 02 11:56:05 2008] [error] [client 127.0.0.1] PHP Fatal error:  Call to
      undefined function phpinf() in /var/www/test.php on line 1

       
    • Rax

      Rax - 2008-06-02

      Hi

      I just found my issue!!
      I didn't have the PHP Mysql module installed. Doh!

      Well, seems to be working fine now.

      Thanks for the help everyone.

      Cheers
      Rax

       
    • Matthias Steffens

      Hi Rax,

      thanks for the feedback.

      > I didn't have the PHP Mysql module installed.

      Glad you were able to resolve your issue!

      I've added a note about the PHP MySQL module to:

      http://requirements.refbase.net/

      Let us know if you run into further trouble...

      Matthias

       
    • Rax

      Rax - 2008-06-02

      Thanks Matthias.. I guess it would also be a good thing if refbase reported an error if it couldn't connect to the Database due to this type of problem.

      I was actually trying to install a different application based on PHP and mysql that led me to my solution.

      Rax

       
      • Matthias Steffens

        Hi Rax,

        > I guess it would also be a good thing if refbase reported an error
        > if it couldn't connect to the Database due to this type of problem.

        Right, I fully agree with you here.

        Actually, refbase does report any MySQL error if it cannot connect to the given MySQL server & database using the given credentials. To see what I mean, you could try changing the values in file 'initialize/db.inc.php' to some incorrect values.

        However, this pertains to *MySQL* errors, not *PHP* errors. I'm not sure what would need to be done to detect your issue. Other folks in this forum may know better.

        > I was actually trying to install a different application based on
        > PHP and mysql that led me to my solution.

        Do you know what this app does to detect the missing PHP MySQL module? Maybe just checking foir the existense of MySQL-specific functions?

        Thanks, Matthias

         
    • Rax

      Rax - 2008-06-05

      I'm not sure I remember exactly, but I think it was trying to do a mysql_connect(). The error returned in the browser window was that the function was unknown. That's what made me click that I probably hadn't installed the PHP Mysql module.

      Hope that helps

      Cheers
      Rax

       

Log in to post a comment.