laburke Posted May 11, 2006 Posted May 11, 2006 Okay, I must be really thick, but I read the whole thread here twice, and I don't understand how you edit the config.php file. Obviously, I must have to change something below >$username = "user"; /* used to access this utility */ $password = "pass"; /* used to access this utility */ $site = "yoursite.com"; $cpnlusername = "cpanelusername"; $cpnlpassword = "cpanelpassword"; ?> but I don't know what or how. Can someone take pity on a beginner? Thanks! Quote
TCH-Bruce Posted May 12, 2006 Posted May 12, 2006 user = the name you want to give access to password = the password for the user site = your-domain.ext cpnlusername = your cpanel user name cpnlpassword = your password to access cpanel Hope that helps Quote
laburke Posted May 12, 2006 Author Posted May 12, 2006 user = the name you want to give access topassword = the password for the user site = your-domain.ext cpnlusername = your cpanel user name cpnlpassword = your password to access cpanel Hope that helps It worked - thanks so much, Bruce! Now I have another question about the "for more security" part...well, more than one. When it says put the config.php file outside the Web Server path, does that mean just put it in the same directory as the public_html folder is, but not in the public_html folder? And does it mean just the config.php file or the whole stats folder? Then when I add the line ><?php include("/home/cpaneluser/config.php"); ?> do I change "cpaneluser" to my cpanel username or the one I created for the client? I guess if I understood the concept I would know that, but I'm still really fuzzy on this stuff. Thanks for any further direction you can give! Quote
TCH-Don Posted May 12, 2006 Posted May 12, 2006 Laura that would be <?php include("/home/yourcpanelusername/config.php"); ?> which links to the config.php file and the file is located above your public_html folder. Quote
laburke Posted May 12, 2006 Author Posted May 12, 2006 Thank you, Don! Bear with me, though: Now I get this error when I go to mysite.com/stats: "Parse error: syntax error, unexpected T_IF in /home/cpaneluser/public_html/stats/index.php on line 28" Here is what line 28 in index.php says: >if (!isset($PHP_AUTH_USER)) { I know almost completely nothing about php, so I can't tell what's wrong. Thanks Quote
TCH-Don Posted May 12, 2006 Posted May 12, 2006 That line looks fine. Most of the time the problem is before the line reported. Quote
laburke Posted May 13, 2006 Author Posted May 13, 2006 That line looks fine.Most of the time the problem is before the line reported. Here are the only lines above line 28 (except for the script license info) ><?php require_once('/home/cpaneluser/safe/config.php') and of course I have replaced cpaneluser with my actual user name. Double-checking, that definitely should be the right path. Could it be something in the first line of the config.php file, which is ><?php include("/home/hxdnooj/safe/config.php"); ? Or could it have to do with permissions on one of these files? Thanks for any pointers you can give me in the right direction Quote
TCH-Don Posted May 13, 2006 Posted May 13, 2006 Yes the first line of your config file is trying to include itself change it to <?php Quote
laburke Posted May 14, 2006 Author Posted May 14, 2006 Yes the first line of your config file is trying to include itselfchange it to <?php Just wanted to thank you again, Don, for your help figuring it out. For anyone else wondering, it was the missing semicolon at the end of this line: ><?php require_once('/home/cpaneluser/safe/config.php') Working fine now. Quote
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.