I have developed a PHP \ Mysql application which work perfectly on my development machine. I moved it over to the production server and now I cannot add, edit, delete, or search data. I moved over the PHP scripts, the mysql database (containing the data) and the "mysql" database containing permissions. I assumed that this would be all that is needed. I have even reapplied permissions so I don't think it could be that. Any ideas?
can you access the database at all?
Did you use some kinda error handling so you konw where or why the error occurs?
I can view data in the database with no problems at all. It's just any editing \ adding \ search cannot be done. I can't understand this because I moved the"mysql" database with all the permissions from the development machine to the new one, with the php files and the applications database. The application works perfectly on the dev machine but not on the production server.
What exactly does not work? Are the queries failing? Do you get parse errors? Are the PHP pages being parsed?
Something has to be failing for it to suddenly not work...
Do you mean you physically copied the mysql database directory from one machine to another? That can cause problems... its better to dump and then load with the source command from teh commandline...
Yes I copied the databases onto disk on transfered them that way. I just tried with another application I know works. I'll have a look into this dump process, would it be best to copy the application databases as well as the mysql database? Thanks!
It would be best not to copy anything.
You should dump teh databases to SQL statements, and reload them on another machine, with MySQL you use the 'source' command at the MySQL command line utility.
Have you figured out what exactly doesntwork yet?
OK I've dumped the databases using mysqldump, no problems. My problem still persists. On, say, edit.php the user is presented with a text box to select an entry by ID with a submit button. This is supposed to submit to itself then display about 8 text boxes \ textarea and stick in the data extracted from the DB for editing. It does not however do this, it seems to try to submit something but them just returns to the orignal incantation of the page. This occurs for all pages (apart from the view.php page). All these scripts worked perfectly on the development server. Thanks for your help!
$10 bucks says you're coding with register_globals ON and it's set to OFF on the live server...
Are you using $POST and $GET?
Doh! Thanks very much, $10? Thats about £7, it's in the post. Thanks for spending some time on this. I haven't been using $POST $GET I'm new to PHP but I assume these are somekind of input \ output functions. Thanks once again!
Rhys
http://www.php.net/manual/en/security.registerglobals.php
http://www.php.net/manual/en/language.variables.predefined.php
Cheers!