PHP code displays in login screen

2003-03-11
2003-11-02
  • Gabe Gagliano

    Gabe Gagliano - 2003-03-11

    When trying to install rolodap, I was able to get the openldap server setup and I was able to load data.  I am able to look at the server with a LDAP GUI client so I know openldap is functioning properly.  When I go to the rolodap login page, I get the following error:
    \n"; if (file_exists ($emailerrorfilename)) { // let them know echo "\n"; } $testdate = date("Ymdhi")."Z"; //jsErrorBox ("$testdate"); ?>
    Fatal error: Call to undefined function: readconfig() in /var/www/html/rolodap-v1/auth.phtml on line 5

    Originally, I was getting the login button with two fields and lots of PHP code dumped to the screen but then I added the following lines to my httpd.conf file and the above resulted:
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .phtml

    I also have enabled php globals.  Any ideas what could be wrong?

    Gabe

     
    • Maarten Nooter

      Maarten Nooter - 2003-04-10

      Hi,

      I have the exact same error. Just checked auth.phtml: the function is readconfig ($CONFIGFILENAME); and it looks like $CONFIGFILENAME is empty at this point.

      I'm far from a PHP guru, can just add that header.phtml contains:

      global $CONFIGFILENAME;
      $CONFIGFILENAME = "/etc/rolodap.conf";

      which looks OK to me...

      Sorry no solution yet :-(

      Maarten

       
    • David Rose

      David Rose - 2003-05-01

      Hi,

      I just ran into this too, and fixed it by setting:

        short_open_tag = On

      in my system php.ini file.

      David

       
    • Bob Ambroso

      Bob Ambroso - 2003-07-07

      Check directory permissions.
      I had the same problems and I did all of the qabove things mentioned but It failed. I adjusted permissions and all is well..
      \Bob

       
    • Ben Dugdale

      Ben Dugdale - 2003-11-02

      Server version: Apache/2.0.40

      Apache was not parsing the .phtml extentions on my setup.  I had to add this to my /etc/httpd/conf.d/php.conf

      <Files *.phtml >
          SetOutputFilter PHP
          SetInputFilter PHP
          LimitRequestBody 524288
      </Files>

      Older versions of Apache (I have seen) had similar functionality built into httpd.conf, though the syntax is diffenent.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks