Discussion:
PHP db will not allow modifications
(too old to reply)
super70s
2018-11-06 21:39:33 UTC
Permalink
Hi, I have an article directory site that runs on php. I have added 1800
articles to it over the past few years as I have time. Lately I've
noticed in the Admin Panel of the site (not the Cpanel of the server)
that it will not accept modifications to existing articles. Also
sometimes the browser will crash when I try that. Could these problems
be due to the db becoming too huge? The Admin Panel is accepting new
articles as normal though and they are displaying on the site.

In my server cPanel under "MySQL Databases," it did not say anything was
wrong with the db and when I checked it, I got this result:

[articlesite_artic.article_master] OK
[articlesite_artic.category_master] OK
[articlesite_artic.document_master] OK
[articlesite_artic.settings] OK
[articlesite_artic.user_master] OK

But I went ahead and did a "repair" on it anyway, and the message was
"db repaired."

When I tried to modify an existing article, the problem remained.

Any thoughts?
Lew Pitcher
2018-11-06 22:40:53 UTC
Permalink
Post by super70s
Hi, I have an article directory site that runs on php. I have added 1800
articles to it over the past few years as I have time. Lately I've
noticed in the Admin Panel of the site (not the Cpanel of the server)
that it will not accept modifications to existing articles. Also
sometimes the browser will crash when I try that. Could these problems
be due to the db becoming too huge? The Admin Panel is accepting new
articles as normal though and they are displaying on the site.
In my server cPanel under "MySQL Databases," it did not say anything was
[articlesite_artic.article_master] OK
[articlesite_artic.category_master] OK
[articlesite_artic.document_master] OK
[articlesite_artic.settings] OK
[articlesite_artic.user_master] OK
But I went ahead and did a "repair" on it anyway, and the message was
"db repaired."
When I tried to modify an existing article, the problem remained.
Any thoughts?
Check the MySQL user privileges; does it include UPDATE privileges on the
relevant databases?
--
Lew Pitcher
"In Skills, We Trust"
Luuk
2018-11-07 13:46:48 UTC
Permalink
Post by super70s
Hi, I have an article directory site that runs on php. I have added 1800
articles to it over the past few years as I have time. Lately I've
noticed in the Admin Panel of the site (not the Cpanel of the server)
that it will not accept modifications to existing articles. Also
sometimes the browser will crash when I try that. Could these problems
be due to the db becoming too huge? The Admin Panel is accepting new
articles as normal though and they are displaying on the site.
In my server cPanel under "MySQL Databases," it did not say anything was
[articlesite_artic.article_master] OK
[articlesite_artic.category_master] OK
[articlesite_artic.document_master] OK
[articlesite_artic.settings] OK
[articlesite_artic.user_master] OK
But I went ahead and did a "repair" on it anyway, and the message was
"db repaired."
When I tried to modify an existing article, the problem remained.
Any thoughts?
Are you using the correct statement to update this table?

What is the exact error message that is given when you try to update an
article?
super70s
2018-11-08 11:48:26 UTC
Permalink
Post by Luuk
Are you using the correct statement to update this table?
What is the exact error message that is given when you try to update an
article?
The message in the "New Article" window says "Article Information Saved"
as normal, however it refuses to accept the modification.

I'm afraid I don't have a lot of experience with this, in fact I had to
hire someone to install the db so I apologize if I "offended anyone's
senses."

It isn't that big a deal really, I'm pretty good at proofreading the
articles before I post them but sometimes I'll spot a small typo or
something and want to go back and correct it (until now, lol).
Jerry Stuckle
2018-11-08 14:30:42 UTC
Permalink
Post by super70s
Post by Luuk
Are you using the correct statement to update this table?
What is the exact error message that is given when you try to update an
article?
The message in the "New Article" window says "Article Information Saved"
as normal, however it refuses to accept the modification.
I'm afraid I don't have a lot of experience with this, in fact I had to
hire someone to install the db so I apologize if I "offended anyone's
senses."
It isn't that big a deal really, I'm pretty good at proofreading the
articles before I post them but sometimes I'll spot a small typo or
something and want to go back and correct it (until now, lol).
It sounds like you aren't checking the result codes from your SQL
statements, so your script does not tell you when a request failed.

You should check the result of *every* database request - or you'll run
into problems like this. Fix your code and see what the failure is.
--
==================
Remove the "x" from my email address
Jerry Stuckle
***@attglobal.net
==================
Martin Gregorie
2018-11-08 15:56:00 UTC
Permalink
Post by Jerry Stuckle
Post by super70s
Post by Luuk
Are you using the correct statement to update this table?
What is the exact error message that is given when you try to update
an article?
The message in the "New Article" window says "Article Information Saved"
as normal, however it refuses to accept the modification.
I'm afraid I don't have a lot of experience with this, in fact I had to
hire someone to install the db so I apologize if I "offended anyone's
senses."
It isn't that big a deal really, I'm pretty good at proofreading the
articles before I post them but sometimes I'll spot a small typo or
something and want to go back and correct it (until now, lol).
It sounds like you aren't checking the result codes from your SQL
statements, so your script does not tell you when a request failed.
You should check the result of *every* database request - or you'll run
into problems like this. Fix your code and see what the failure is.
...and don't forget that some SQL statements generate a linked chain of
exception messages if they fail. Trapping the first exception may tell
your code that there is a problem and what sort it is, but if its fatal
you probably need to see all the exceptions in the chain to understand
what went wrong.
--
Martin | martin at
Gregorie | gregorie dot org
super70s
2018-11-09 06:44:34 UTC
Permalink
Post by Martin Gregorie
Post by Jerry Stuckle
Post by super70s
Post by Luuk
Are you using the correct statement to update this table?
What is the exact error message that is given when you try to update
an article?
The message in the "New Article" window says "Article Information Saved"
as normal, however it refuses to accept the modification.
I'm afraid I don't have a lot of experience with this, in fact I had to
hire someone to install the db so I apologize if I "offended anyone's
senses."
It isn't that big a deal really, I'm pretty good at proofreading the
articles before I post them but sometimes I'll spot a small typo or
something and want to go back and correct it (until now, lol).
It sounds like you aren't checking the result codes from your SQL
statements, so your script does not tell you when a request failed.
You should check the result of *every* database request - or you'll run
into problems like this. Fix your code and see what the failure is.
...and don't forget that some SQL statements generate a linked chain of
exception messages if they fail. Trapping the first exception may tell
your code that there is a problem and what sort it is, but if its fatal
you probably need to see all the exceptions in the chain to understand
what went wrong.
I guess a workaround could be to simply delete the article that needs
the modification, make the correction, then repost it as a new article.
But I'd lose any "link juice" that URL had.
Jerry Stuckle
2018-11-10 03:11:54 UTC
Permalink
Post by super70s
Post by Martin Gregorie
Post by Jerry Stuckle
Post by super70s
Post by Luuk
Are you using the correct statement to update this table?
What is the exact error message that is given when you try to update
an article?
The message in the "New Article" window says "Article Information Saved"
as normal, however it refuses to accept the modification.
I'm afraid I don't have a lot of experience with this, in fact I had to
hire someone to install the db so I apologize if I "offended anyone's
senses."
It isn't that big a deal really, I'm pretty good at proofreading the
articles before I post them but sometimes I'll spot a small typo or
something and want to go back and correct it (until now, lol).
It sounds like you aren't checking the result codes from your SQL
statements, so your script does not tell you when a request failed.
You should check the result of *every* database request - or you'll run
into problems like this. Fix your code and see what the failure is.
...and don't forget that some SQL statements generate a linked chain of
exception messages if they fail. Trapping the first exception may tell
your code that there is a problem and what sort it is, but if its fatal
you probably need to see all the exceptions in the chain to understand
what went wrong.
I guess a workaround could be to simply delete the article that needs
the modification, make the correction, then repost it as a new article.
But I'd lose any "link juice" that URL had.
No, the "workaround" is to correct your code.
--
==================
Remove the "x" from my email address
Jerry Stuckle
***@attglobal.net
==================
The Natural Philosopher
2018-11-10 08:30:11 UTC
Permalink
Post by Jerry Stuckle
No, the "workaround" is to correct your code.
Its not his code.

Wanker.
--
“The fundamental cause of the trouble in the modern world today is that
the stupid are cocksure while the intelligent are full of doubt."

- Bertrand Russell
Jerry Stuckle
2018-11-10 13:34:37 UTC
Permalink
Post by The Natural Philosopher
Post by Jerry Stuckle
No, the "workaround" is to correct your code.
Its not his code.
Wanker.
He may not have written it - but it's still his code. Idiot.
--
==================
Remove the "x" from my email address
Jerry Stuckle
***@attglobal.net
==================
Martin Gregorie
2018-11-10 18:09:20 UTC
Permalink
Post by Jerry Stuckle
Post by The Natural Philosopher
Post by Jerry Stuckle
No, the "workaround" is to correct your code.
Its not his code.
Wanker.
He may not have written it - but it's still his code. Idiot.
Tush Tush Tush.

I'm inclined to agree with Jerry here: the OP's answers look more like
something a user would say as opposed to even an inexperienced sysadmin
or developer.

So, to the OP: if I've guessed right, you should raise this with your
website's help desk if they provide you with access to a publishing
package that they installed and maintain or, if you've installed the
publishing package yourself, ask the package's authors for help or raise
a bug against it.

comp.lang.php is a discussion and self-help forum for developers capable
of writing and maintaining PHP code rather than those using PHP packages
that others maintain and/or modify. This explains why you're being given
answers suitable for a PHP programmer rather than the PHP package user
you would seem to be.
--
Martin | martin at
Gregorie | gregorie dot org
The Natural Philosopher
2018-11-10 18:12:10 UTC
Permalink
Post by Martin Gregorie
Post by Jerry Stuckle
Post by The Natural Philosopher
Post by Jerry Stuckle
No, the "workaround" is to correct your code.
Its not his code.
Wanker.
He may not have written it - but it's still his code. Idiot.
Tush Tush Tush.
How can he correct it when its not his code?
Post by Martin Gregorie
I'm inclined to agree with Jerry here: the OP's answers look more like
something a user would say as opposed to even an inexperienced sysadmin
or developer.
Exactly. Its not his code. He rents space on a systemn and he rents code.
Post by Martin Gregorie
So, to the OP: if I've guessed right, you should raise this with your
website's help desk if they provide you with access to a publishing
package that they installed and maintain or, if you've installed the
publishing package yourself, ask the package's authors for help or raise
a bug against it.
comp.lang.php is a discussion and self-help forum for developers capable
of writing and maintaining PHP code rather than those using PHP packages
that others maintain and/or modify. This explains why you're being given
answers suitable for a PHP programmer rather than the PHP package user
you would seem to be.
As I said, you are agreeing with me. It's not his code.

Otherwise he wouldnt have to take it up with his websites helpdesk.
--
Renewable energy: Expensive solutions that don't work to a problem that
doesn't exist instituted by self legalising protection rackets that
don't protect, masquerading as public servants who don't serve the public.
Jerry Stuckle
2018-11-10 23:02:39 UTC
Permalink
Post by The Natural Philosopher
Post by Martin Gregorie
Post by The Natural Philosopher
Post by Jerry Stuckle
No, the "workaround" is to correct your code.
Its not his code.
Wanker.
He may not have written it - but it's still his code.  Idiot.
Tush Tush Tush.
How can he correct it when its not his code?
Post by Martin Gregorie
I'm inclined to agree with Jerry here: the OP's answers look more like
something a user would say as opposed to even an inexperienced sysadmin
or developer.
Exactly. Its not his code. He rents space on a systemn and he rents code.
Post by Martin Gregorie
So, to the OP: if I've guessed right, you should raise this with your
website's help desk if they provide you with access to a publishing
package that they installed and maintain or, if you've installed the
publishing package yourself, ask the package's authors for help or raise
a bug against it.
comp.lang.php is a discussion and self-help forum for developers capable
of writing and maintaining PHP code rather than those using PHP packages
that others maintain and/or modify. This explains why you're being given
answers suitable for a PHP programmer rather than the PHP package user
you would seem to be.
As I said, you are agreeing with me. It's not his code.
Otherwise he wouldnt have to take it up with his websites helpdesk.
It makes no difference if he wrote it or not. It is his website, and he
is responsible for it. If someone else wrote the code for him, it is
still his responsibility to take it up with them.

Just because he did not write the code does not mean he is not
responsible for it. But ditch diggers like you don't understand things
like that.

I suggest you go back and try to figure out which end of the shovel to
use. You might be able to get a job. We know you aren't a programmer.
--
==================
Remove the "x" from my email address
Jerry Stuckle
***@attglobal.net
==================
Luuk
2018-11-08 18:01:34 UTC
Permalink
Post by super70s
Post by Luuk
Are you using the correct statement to update this table?
What is the exact error message that is given when you try to update an
article?
The message in the "New Article" window says "Article Information Saved"
as normal, however it refuses to accept the modification.
OK, your application is telling you "the information is saved", but you
do not see the info in your database.
Post by super70s
I'm afraid I don't have a lot of experience with this, in fact I had to
hire someone to install the db so I apologize if I "offended anyone's
senses."
You indicate not to have experience with this db.

How should we know what went wrong if we only see the descriptions of
wat want wrong, and do not see any logging, or any SQL statements?
(or, for the PHP part, any PHP-code)
Post by super70s
It isn't that big a deal really, I'm pretty good at proofreading the
articles before I post them but sometimes I'll spot a small typo or
something and want to go back and correct it (until now, lol).
The Natural Philosopher
2018-11-08 18:38:18 UTC
Permalink
Post by Luuk
Post by super70s
Post by Luuk
Are you using the correct statement to update this table?
What is the exact error message that is given when you try to update an
article?
The message in the "New Article" window says "Article Information Saved"
as normal, however it refuses to accept the modification.
OK, your application is telling you "the information is saved", but you
do not see the info in your database.
Post by super70s
I'm afraid I don't have a lot of experience with this, in fact I had to
hire someone to install the db so I apologize if I "offended anyone's
senses."
You indicate not to have experience with this db.
How should we know what went wrong if we only see the descriptions of
wat want wrong, and do not see any logging, or any SQL statements?
(or, for the PHP part, any PHP-code)
I think that is the point...

he doesnt have access to admin level or indeed the code.

My guess is the user the code runs has no update privs. But does have
create,
Post by Luuk
Post by super70s
It isn't that big a deal really, I'm pretty good at proofreading the
articles before I post them but sometimes I'll spot a small typo or
something and want to go back and correct it (until now, lol).
--
"The great thing about Glasgow is that if there's a nuclear attack it'll
look exactly the same afterwards."

Billy Connolly
Jerry Stuckle
2018-11-10 13:36:16 UTC
Permalink
Post by The Natural Philosopher
Post by Luuk
Post by super70s
Post by Luuk
Are you using the correct statement to update this table?
What is the exact error message that is given when you try to update an
article?
The message in the "New Article" window says "Article Information Saved"
as normal, however it refuses to accept the modification.
OK, your application is telling you "the information is saved", but you
do not see the info in your database.
Post by super70s
I'm afraid I don't have a lot of experience with this, in fact I had to
hire someone to install the db so I apologize if I "offended anyone's
senses."
You indicate not to have experience with this db.
How should we know what went wrong if we only see the descriptions of
wat want wrong, and do not see any logging, or any SQL statements?
(or, for the PHP part, any PHP-code)
I think that is the point...
he doesnt have access to admin level or indeed the code.
My guess is the user the code runs has no update privs. But does have
create,
Only an idiot would specify admin privileges like that. But you would.
Post by The Natural Philosopher
Post by Luuk
Post by super70s
It isn't that big a deal really, I'm pretty good at proofreading the
articles before I post them but sometimes I'll spot a small typo or
something and want to go back and correct it (until now, lol).
--
==================
Remove the "x" from my email address
Jerry Stuckle
***@attglobal.net
==================
Percival John Hackworth
2018-11-07 16:44:12 UTC
Permalink
Post by super70s
Hi, I have an article directory site that runs on php. I have added 1800
articles to it over the past few years as I have time. Lately I've
noticed in the Admin Panel of the site (not the Cpanel of the server)
that it will not accept modifications to existing articles. Also
sometimes the browser will crash when I try that. Could these problems
be due to the db becoming too huge? The Admin Panel is accepting new
articles as normal though and they are displaying on the site.
In my server cPanel under "MySQL Databases," it did not say anything was
[articlesite_artic.article_master] OK
[articlesite_artic.category_master] OK
[articlesite_artic.document_master] OK
[articlesite_artic.settings] OK
[articlesite_artic.user_master] OK
But I went ahead and did a "repair" on it anyway, and the message was
"db repaired."
When I tried to modify an existing article, the problem remained.
Any thoughts?
Can you connect to the database with mysql? Can you update or remove records
from tables? Can you export the database to a SQL file?

These are primitives that point to issues with the database. The web
interface may be the underlaying problem. Until you isolate where the problem
is, it's anyone's guess. It's like going to the dealership and saying "the
car makes this weird sound when I go over 50".

Spend some more time isolating the issue and report back your findings.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
Loading...