mjm Posted July 14, 2010 Share Posted July 14, 2010 Hi all, I just installed WHMCS, and am having a problem. The contents of the php.ini file are being displayed after login, and at the top of each page accessed in the "Portal." I installed WHMCS on a shared server at 1and1.com. Since this is a shared server, I don't have permissions to make changes to the global php.ini file. So I placed a php.ini file in the root WHMCS directory, then created a link to that php.ini file in every sub-directory that has a .php file. Following the "Further Security Steps" instructions, I moved the "attachments", "downloads" and "templates_c" directories, and updated configuration.php to reflect the new locations. I also renamed the admin directory, and added the $customadminpath to the configuration.php file. When I go to the admin login screen, I'm able to enter the admin username and password. I then see a page which displays the contents of the php.ini file. If I then go to http://www.mydomain.com/whmcs, I see the "Portal Home" page. However, at the top of the "Portal Home" page, and of every page I access, the contents of the php.ini file are displayed. I've searched this forum, as well as a number of Google searched, but I can't find any information related to this problem. I would appreciate any help to resolve this issue. 0 Quote Link to comment Share on other sites More sharing options...
mjm Posted July 14, 2010 Author Share Posted July 14, 2010 Hi all, I did some more work on this since posting my question. It turns out that WHMCS is displaying the php.ini file that I put in the /includes/hooks directory. I removed the php.ini file in that directory, and the problem is resolved. I haven't yet looked into the reason for this, but I suspect that anything in the /includes/hooks directory gets automatically merged into each .php file in the system, enabling developers to make enhancements to the WHMCS system without accessing the source code, or editing each .php file. Thanks for the quick resolution! 0 Quote Link to comment Share on other sites More sharing options...
mjm Posted July 14, 2010 Author Share Posted July 14, 2010 "...I suspect that anything in the /includes/hooks directory gets automatically merged into each .php file in the system, enabling developers to make enhancements to the WHMCS system without accessing the source code, or editing each .php file" Looks like I was pretty close! More details on how "hooks" work can be found here: http://wiki.whmcs.com/Hooks 0 Quote Link to comment Share on other sites More sharing options...
Grizzlyware Josh Posted July 15, 2010 Share Posted July 15, 2010 Yep, everything in that folder is included on every page, front/back end & cron 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted July 15, 2010 Share Posted July 15, 2010 Hah, I discovered this the other day too while editing some custom hooks. Opening a file in there in vi will break a lot of stuff because whmcs will read the .swp file created by the editor. I would think they should ignore anything that isnt a .php extension. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.