Jump to content

Recommended Posts

Posted

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!

Posted

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

Posted
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

 

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!

Posted

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.

Posted

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 :goof:

Posted
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 :D

Posted
Yes the first line of your config file is trying to include itself

change 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. :group:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...