When I was demo'ing my video system on Wednesday, I mentioned a problem I
ran into where the linking from an episode to its previous and next
episodes had broken after an update of the IMDB tables.

I spent some time this evening examining the problem. When I pasted the
query into  psql, it gave the correct results,  and I found no obvious
errors in the  code.

To debug it further, I decided to run the cgi script from the command line
so I could add diagnostic printf's that would cause a web browser to fail.
The first time I ran it, it worked fine.

Given that the problem was not with the SQL and not the CGI script, I
figured it must be a problem with permissions. Upon investigation, I found
that the episode_list view was accessible to jabr, but not to apache.

The last time I reloaded a fresh copy of the IMDB tables, I was developing
and testing a script to automate the process. To speed up the process, I
found it necessary to delete all the indexes and table constraints before
deleting the table rows and importing the fresh ones, and then add back the
indexes and constraints afterward. I did it for all the TABLEs, but
apparently I overlooked at least one of the VIEWs.

Once I granted SELECT privileges on the episode_list view to apache, the
links began working again.

-- 
John Abreau / Executive Director, Boston Linux & Unix
Email: [email protected] / WWW http://www.abreau.net / PGP-Key-ID 0x920063C6
PGP-Key-Fingerprint A5AD 6BE1 FEFE 8E4F 5C23  C2D0 E885 E17C 9200 63C6
_______________________________________________
Discuss mailing list
[email protected]
https://lists.blu.org/mailman/listinfo/discuss

Reply via email to