ffeingol Posted August 3, 2009 Share Posted August 3, 2009 We've test custom pages and have no issues creating: /whmcs/mycustom.php Is it possible to do this: /whmcs/custom/index.php /whmcs/custom/custom2/index.php /whmcs/custom/custom3/index.php When we try to pull in the required WHMCS includes they generate errors. Thanks 0 Quote Link to comment Share on other sites More sharing options...
thehost5968 Posted August 4, 2009 Share Posted August 4, 2009 what errors? 0 Quote Link to comment Share on other sites More sharing options...
lysenshi Posted August 4, 2009 Share Posted August 4, 2009 just change the include path in the php, and should be ok then: include("dbconnect.php"); //for whmcs/mycustom.php will be: include("../dbconnect.php"); //for whmcs/custom/index.php Hope it was helpful 0 Quote Link to comment Share on other sites More sharing options...
ffeingol Posted August 4, 2009 Author Share Posted August 4, 2009 Hello Guys, Yes, I know how to adjust the include path (or at least I think I do). If you simply change it to ../dbconnect.php you get something like: Warning: opendir(lang/) [function.opendir]: failed to open dir: No such file or directory in /###/###/dbconnect.php on line 0 Warning: readdir(): supplied argument is not a valid Directory resource in /###/###/dbconnect.php on line 0 Warning: closedir(): supplied argument is not a valid Directory resource in /###/###/dbconnect.php on line 0 Warning: opendir(lang/) [function.opendir]: failed to open dir: No such file or directory in /###/###/includes/clientareafunctions.php on line 0 Warning: readdir(): supplied argument is not a valid Directory resource in /###/###/includes/clientareafunctions.php on line 0 Warning: closedir(): supplied argument is not a valid Directory resource in /###/###/includes/clientareafunctions.php on line 0 Warning: Template error: unable to read resource: "mytemplate/header.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095 Warning: Template error: unable to read resource: "mytemplate/header.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095 Warning: Template error: unable to read resource: "mytemplate/frank.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095 Warning: Template error: unable to read resource: "mytemplate/frank.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095 Powered by WHMCompleteSolution Warning: Template error: unable to read resource: "mytemplate/footer.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095 Warning: Template error: unable to read resource: "mytemplate/footer.tpl" in /###/###/includes/smarty/Smarty.class.php on line 1095 If I use ini_set or change the include_path in php.ini so php automatically looks in my WHMCS install dir I get rid of the smarty issues but all the opendir/readdir/closedir errors still exist. Something in dbconnect.php and clientareafunctions.php must be using a relative path and it gets messed up when I go a directory deeper. Any help is appreciated. 0 Quote Link to comment Share on other sites More sharing options...
DedicatedPros Posted August 4, 2009 Share Posted August 4, 2009 Is the dbconnect.php file in /###/###/dbconnect.php (it would help to see the actual structure not just the # signs), or is it in /###/dbconnect.php?? If you could post the full error it would be great, and its not really a security issue so don't worry 0 Quote Link to comment Share on other sites More sharing options...
ffeingol Posted August 4, 2009 Author Share Posted August 4, 2009 It's in /###/###/dbconnect.php. The document root for the site is /###/###/. I would think the actual directory names are not important, which is why I replaced them with ###. Thanks. 0 Quote Link to comment Share on other sites More sharing options...
Lawrence Posted August 4, 2009 Share Posted August 4, 2009 I thought custom pages could only be put in the root whmcs folder? The wiki @ http://wiki.whmcs.com/Creating_Pages says This code is designed to work with files placed in the root whmcs directory. 0 Quote Link to comment Share on other sites More sharing options...
ffeingol Posted August 4, 2009 Author Share Posted August 4, 2009 Yea, I read that too. I've opened a support ticket to get the final answer. I'll update this thread when I hear back from support. We have a whole bunch of pages to add (tutorials) so having different tutorials in different directories just makes things a whole lot easier. 0 Quote Link to comment Share on other sites More sharing options...
ffeingol Posted August 5, 2009 Author Share Posted August 5, 2009 Can't be done so we'll have to do it with mod_rewrite. 0 Quote Link to comment Share on other sites More sharing options...
InteraNetworks Posted August 5, 2009 Share Posted August 5, 2009 We've test custom pages and have no issues creating: /whmcs/mycustom.php Is it possible to do this: /whmcs/custom/index.php /whmcs/custom/custom2/index.php /whmcs/custom/custom3/index.php When we try to pull in the required WHMCS includes they generate errors. Thanks How did you get your custom pages to work? I setup one and it shifts the entire page over to the left contrary to the rest of whmcs. I have been told it is in the tpl file, but I even used the custom page to point to an already existing whmcs tpl and it still did that. Could you show me the php file? I used the example from the wiki without complete success. Thanks! 0 Quote Link to comment Share on other sites More sharing options...
ffeingol Posted August 5, 2009 Author Share Posted August 5, 2009 My php file looks almost exactly like the example (changing the page title and links to the page). I'd also have to agree that it's prob. you template. Might be worth having you post your template file here. If things are not lining up properly I'd think it's a un-closed div or a div that is not clearing things (assuming your coding in XHTML). 0 Quote Link to comment Share on other sites More sharing options...
InteraNetworks Posted August 6, 2009 Share Posted August 6, 2009 My php file looks almost exactly like the example (changing the page title and links to the page). I'd also have to agree that it's prob. you template. Might be worth having you post your template file here. If things are not lining up properly I'd think it's a un-closed div or a div that is not clearing things (assuming your coding in XHTML). I actually did in another post. I even tried a blank file with no change. It tried with/without tables, with/without div tags and just plane text. all failed. I even pointed to homepage template with the exact results. This tells me it is not the template at all but the code in the example. Any suggestions here would be great! 0 Quote Link to comment Share on other sites More sharing options...
InteraNetworks Posted August 6, 2009 Share Posted August 6, 2009 Yea! I got it working.... page loads centered! Thanks for your help. 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.