Page 1 of 1
Beginner Question on .php?
Posted: Thu Apr 02, 2009 7:43 pm
by spock0149
Hi folks - first time poster!
I run the website
http://www.citizenshipper.com
I have paid professionals to do the bulk of the programming however - as I know a little html I do make minor text modifications here and there. I am careful with my changes.
Here's my problem:
When you go to my main mage (
http://www.citizenshipper.com) and click on the navigation panel on the left you are taken to a page that says: "You have to be logged in to use that function"
Which is at address:
http://www.citizenshipper.com/login.php ... 20function
My questions
I want to change the text in this message. However, I have had a look at the login.php file and cannot find the phrase "You have to be logged in to use that function". Can anyone help suggest how I might find where the coders placed that text so that I can change it?
Thanks in advance.
Spock
(Total Noob Poster)
Re: Beginner Question on .php?
Posted: Fri Apr 03, 2009 12:09 am
by spock0149
Thanks for the reply.
I just looked an it wasn't in index.php.
Any other ideas where it might be?
Thanks.
Re: Beginner Question on .php?
Posted: Fri Apr 03, 2009 12:31 am
by miyur
search for the following string in all your files. most probably all the error codes would be listed in one single file. so try looking for files titled like error.php or errors.php or errorcodes.php.
Re: Beginner Question on .php?
Posted: Fri Apr 03, 2009 1:55 am
by spock0149
McInfo wrote:How many files would you have to search in to search every file in your site?
A lot unfortunately!

Re: Beginner Question on .php?
Posted: Fri Apr 03, 2009 1:56 am
by spock0149
miyur wrote:search for the following string in all your files. most probably all the error codes would be listed in one single file. so try looking for files titled like error.php or errors.php or errorcodes.php.
hmmm....coool. I looked but no error.php files - but the above might be useful. Thanks.

Re: Beginner Question on .php?
Posted: Fri Apr 03, 2009 1:58 am
by spock0149
McInfo wrote:This script searches all files in a given directory (and sub-directories) for a search phrase. If you have many files in your directories,
it will very likely time out. Just put the script in an upper directory and it will show you a list of files that contain the search phrase.
Code: Select all
<?php
$search_for = 'You have to be logged in to use that function';
$starting_directory = '.'; // '.' is the folder this file is in
$directories_deep = 5; // Careful with this
brute_force_file_search($search_for, $starting_directory, $directories_deep);
function brute_force_file_search ($search_for, $directory = '.', $max_depth = 1, $depth = 0)
{
$basename = basename($directory);
if (is_file($directory))
{
$contents = file_get_contents($directory);
if (false !== ($pos = strpos($contents, $search_for)))
echo "$directory<br />\n";
return true;
}
else if (is_dir($directory))
{
if ((0 !== strpos($basename, '.') || 0 == $depth)
&& $max_depth > $depth++ && $dh = opendir($directory))
{
while (false !== ($file = readdir($dh)))
{
brute_force_file_search($search_for, "$directory/$file", $max_depth, $depth);
}
closedir($dh);
}
return true;
}
else
return false;
}
?>
Awesome! Thanks. You say just put the script in an upper directory (I can do that!

), but then what? How do I make execute it?
Re: Beginner Question on .php?
Posted: Fri Apr 03, 2009 2:41 am
by susrisha
i beleive its written in the index.php page which serves as the default page.. if you can provide a snippet of the starting lines, may be we can help.. usually the message is set when some of the session variables for logged in or not are not set. goes something like this
Code: Select all
if($_SESSION['loggedin'])
{
echo 'Logged in url';
}
else
{
echo 'You have to be logged in stuff';
}
You will be able to pin point it if you know the exact file which the server is displaying on the main page.