PDA

View Full Version : custom install


rom
02-05-2004, 01:12 PM
hi all,

i am working with php version 4.3.3, linux, not safe mode enabled.

i was not able to use install.php on my server or to manually install phpdig using the instructions provided in phpdig-doc-en.html, because my service provider does not allow new databases to be created by the user. i don't know why, but that's how it is. so, once you are assigned a database to work with, that is all you get.

to work around this, i took the code from init_db.sql to create the necessary tables in my pre-assigned database. i'm not sure how to proceed from here.

1. is there an easy way to populate the tables (i.e. insert the words to be excluded, etc.)?

2. do i need to do anything to the database itself other than ensure it is configured with a user name and password, host name, etc.?

i am getting the search.php page fine, and have tried searching for words i know are on my site. of course, i'm getting no results, because the tables are only partially set up.

thanks.

Charter
02-05-2004, 03:28 PM
Hi. Sections 4.2 and 4.3 here (http://www.phpdig.net/navigation.php?action=doc#toc4) may be helpful. Once configured then call admin/index.php from your browser to start indexing.

rom
02-05-2004, 06:43 PM
hi there,

thanks for the prompt reply. i followed sections 4.2 and 4.3 as much as possible, except that again, i couldn't use the code below, because of restrictions on my server.

#mysql mysql
mysql> CREATE DATABASE phpdig;
mysql> quit

so instead i created the tables within my existing database using the code from [PHPDIG_DIR]/sql/init_db.sql to set the table names, variables and attributes.

the tables are all there. they have no values in them, though.

when i go to the index.php page, it is blank, but i do get the search.php page to come up ok. it just gives me "no results" all the time.

in an attempt to debug what is happening with the index.php code, i have added in that file some flags to show where the code is getting hung up. i inserted:

print "we are here1\n";
print "we are here2\n"; etc.

in various places, and it looks like i'm getting as far as

include "$relative_script_path/libs/auth.php";

then dieing.

your thoughts?

rom

rom
02-05-2004, 06:47 PM
actually i get to just before

include "$relative_script_path/libs/auth.php";

so the last line of code that appears to be running ok is

include "$relative_script_path/includes/config.php";

thanks.

Charter
02-05-2004, 07:22 PM
Hi. When you did the FTP, did you keep the same directory structure? Did you happen to change the $relative_script_path variable?

>> the tables are all there. they have no values in them, though.

That is okay. The tables will get values once admin/index.php is used. The constants in the connect.php file (without the underscore in front) just need to match the database information.

rom
02-06-2004, 01:56 PM
hi,

again thanks for the prompt reply.

in index.php, i have not changed the relative path script. was i supposed to?

i have put the phpdig directory in my HTML subdirectory. i also tried it in the root directory, but i still got a blank page when calling the index.php except for the flags i've inserted.

the output i'm getting is:
we are here1
we are here2

after the introductory section of the code in index.php i have:

print "we are here1\n";

Header('Pragma: no-cache');
$relative_script_path = '..';

include "$relative_script_path/includes/config.php";

print "we are here2\n";

include "$relative_script_path/libs/auth.php";

print "we are here3\n";

// extract vars
extract( phpdigHttpVars(
array('message'=>'string')
));

print "we are here4\n";

thanks very much.

Charter
02-06-2004, 02:55 PM
>> in index.php, i have not changed the relative path script. was i supposed to?

Hi. No, you do not need to change the $relative_script_path variable, unless of course you changed the directory structure of PhpDig.

Is it that "we are here2" printed out but "we are here3" did not? If so, do you get a grey popup box asking for a username and pasword when you try to access admin/index.php? If not, then set define('PHPDIG_ADM_AUTH','1'); to define('PHPDIG_ADM_AUTH','0'); in the config.php file and protect the admin directory with htaccess or another method instead.

Also, check out this (http://www.phpdig.net/showthread.php?threadid=470) thread for a $_SERVER variables discussion.

rom
02-10-2004, 10:55 AM
good morning,

i changed define('PHPDIG_ADM_AUTH','1') to define('PHPDIG_ADM_AUTH','0') in the config.php file, as directed, and used htaccess to protect the admin directory. i can now index the first page of my website only. i think that maybe there is still an authentication issue.

on the index.php page, i have tried using search depths ranging anywhere from 1 to 20, but it never seems to be able to index anything more than my home page, which is working well. i noticed that i also can't use the "update form" and "delete site" buttons. when i click on them i get a blank page, and nothing has been updated. each time that i've tried to us a new depth setting, i've had to go into the database tables and delete the entries.

thanks very much.

Charter
02-11-2004, 08:18 AM
Hi. When you did the FTP, did you keep the same directory structure, with all files in their preassigned directories?

rom
02-11-2004, 12:27 PM
hi charter,

yes, i did. all the files and directories were FTPed onto my server the way they appeared after they were unzipped, other than the changes to user name, password, etc. nothing was moved around in the directories.

thanks.

Charter
02-11-2004, 12:45 PM
Hi. Is PHP running as Apache or CGI mode? Maybe this is a timeout issue? What's the link to your site?

rom
02-11-2004, 02:33 PM
hi charter,

it is running as apache.

rom

Charter
02-11-2004, 02:42 PM
Hi. The main page at http://www.cgxenergy.ca/ only has the following. There are no links to say http://www.cgxenergy.ca/annex.html so annex.html isn't crawled.

<HTML>
<HEAD>
<TITLE>Moving in...</TITLE>
</HEAD>
<BODY>
<CENTER>
<H1>We're just moving in...</H1>
</CENTER>
Come back soon when we're up and running!
</BODY>
</HTML>

If you place http://www.cgxenergy.ca/annex.html in the text box in the admin panel, at search depth one, you should get something like the following:

links found : 19
http://www.cgxenergy.ca/annex.html
http://www.cgxenergy.ca/
http://www.cgxenergy.ca/columbusSubBasin.html
http://www.cgxenergy.ca/pomeroonLicence.html
http://www.cgxenergy.ca/turbiditeTrend.html
http://www.cgxenergy.ca/berbiceCanyon.html
http://www.cgxenergy.ca/wishbone.html
http://www.cgxenergy.ca/horseshoe.html
http://www.cgxenergy.ca/georgetownLicence.html
http://www.cgxenergy.ca/fiscalRegime.html
http://www.cgxenergy.ca/seismicProgram.html
http://www.cgxenergy.ca/eagle.html
http://www.cgxenergy.ca/workProgram.html
http://www.cgxenergy.ca/corentyneLicence.html
http://www.cgxenergy.ca/basinPotential.html
http://www.cgxenergy.ca/maritimeBorder.html
http://www.cgxenergy.ca/guyanaExploration.html
http://www.cgxenergy.ca/regionalOverview.html
http://www.cgxenergy.ca/offshore.html
Optimizing tables...
Indexing complete !

rom
02-11-2004, 03:08 PM
i'll try that. thanks very much.

rom
02-12-2004, 10:06 AM
hi charter,

i was able to index the site using the directions you provided. i now have the links (19) and close to 1000 words in the keyword table, but when i go to search.php, and search for words that i know are in that table, i still get no results. i'm not sure why.

thanks again.

rom:confused:

Charter
02-12-2004, 11:23 AM
Hi. If I had to guess, I would say that you have PhpDig installed more than once and are going to the wrong search.php file to search?

rom
02-23-2004, 10:05 AM
Hi Charter,

I confirmed that I didn't have it loaded twice. I'm not sure why it wasn't working, so I reindexed my site, and now it is fine.

Thanks for all your help on this.

Rom:D