I shifted the whole lot onto my desktop (from the laptop) and installed all
the works from the same release of phptriad so that everything was running
fine.
Then I copied my folders and data from the laptop to the desktop, placing
the folders in the same locations under 'htdocs' and 'mysql' respectively
for the site and the database.
The site is working perfectly (well, as good as the laptop :-) ) but none of
my sql statements containing an UPDATE command will work. I get the 'die'
line from the following statement:
--
$hit_count++;
$sql = "UPDATE articles
SET hit_count = \"$hit_count\"
WHERE article_ID = \"$article_ID\"
";
// $result = @mysql_query($sql,$connection) or die("Couldn't execute query
to increment hit_count!");
--
So, in short - this site works on one local machine and the web server in
the same version. However, it doesn't work on the 2nd local machine.
The only thing that springs to mind is that somehow the MySQL database in
read-only allowing me to perform SELECT but not UPDATE statements. Does
this sound possible? I couldn't find anything in MySQL manual or on Google
that looked helpfull....
TIA
Phil
Can you log into the server and use the 'mysql' client to
manually execute the query? If so, what does the MySQL
server say back?
Alternatively, remove the "@" in the mysql_query statement
so PHP will output the error messages. This way you may
be able to see what the problem is.
Arnoud
--
Arnoud Engelfriet, Dutch patent attorney - Speaking only for myself
Patents, copyright and IPR explained for techies: http://www.iusmentis.com/
Thanks Arnoud,
I have just set up phpmyadmin and tried this. I get a reply telling me
"Table 'articles' is read only"
I can't seem to find anything in phpmyadmin (or any other command) telling
my how to make the table have full access.
I have tried TABLE UNLOCK as well as manually checking that the actual file
on the drive is full access - no luck...
Any help/clues appreciated!
Thanks,
Phil
Fixed!!
Rather than importing the db into mysql, I simply shortcut and dumped the
data files into the data folder.
Since the tables could be read and SELECT was working, I presumed that all
was good!
Wrong....
However, a dump, create new db and reload the dump has sorted everything out
nicely! I am now up and running....
Hope this helps someone else in future!!!
Phil