phpdeveloper2006 Posted September 12, 2006 Share Posted September 12, 2006 Hi,My PHP website run on MySQL 4.0 without any problem. But now host server company switched me to MySQL 4.1 and my PHP website has problem(s).My PHP website still can run on MySQL 4.1 but but nothing is populating into my PHP website. And I know the data is in the database. (MySQL 4.1 database)Question #1: What is the problem?Question #2: How can I make my PHP website so that my PHP website can run on MySQL 4.1?Any suggestions would be much appreciated!Thanks,May Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/ Share on other sites More sharing options...
HuggieBear Posted September 12, 2006 Share Posted September 12, 2006 How about providing us an error message and some code...RegardsRich Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-90576 Share on other sites More sharing options...
paul2463 Posted September 12, 2006 Share Posted September 12, 2006 the only thing I could see in the 4.0 to 4.1 paperwork after a quick look is the following[quote]Table names and column names now are stored in UTF8. This makes MySQL more flexible, but might cause some problems upgrading if you have table or column names that use characters outside of the standard 7-bit US-ASCII range. [/quote] Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-90614 Share on other sites More sharing options...
mainewoods Posted September 12, 2006 Share Posted September 12, 2006 maybe they changed the configuration so 'register_globals' is now turned off. http://www.php.net/manual/en/security.globals.php-Which might mean that none of your form fields or url parameters are being recognized and recieved by the recieving php program and any query based on those values would fail!you should be able to get the value this way:[code]if (ini_get('register_globals')) { echo "'register_globals' is ON";else echo "'register_globals' is OFF"; [/code] Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-90781 Share on other sites More sharing options...
phpdeveloper2006 Posted September 13, 2006 Author Share Posted September 13, 2006 [quote author=HuggieBear link=topic=107809.msg432919#msg432919 date=1158084135]How about providing us an error message and some code...RegardsRich[/quote]Hi Rich,Sorry there is no error message. My PHP site still runs on MySQL 4.1 without any problem. The data justdoes not come from the MySQL 4.1.Thanks,Jimmy Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-90832 Share on other sites More sharing options...
AndyB Posted September 13, 2006 Share Posted September 13, 2006 Well, since there are no error messages I'll guess it's a problem with code - assuming you have checked and can discount the suggestions from mainewoods and paul2463 - so you might have to show us some of it ... Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-90838 Share on other sites More sharing options...
phpdeveloper2006 Posted September 14, 2006 Author Share Posted September 14, 2006 [quote author=AndyB link=topic=107809.msg433204#msg433204 date=1158115364]Well, since there are no error messages I'll guess it's a problem with code - assuming you have checked and can discount the suggestions from mainewoods and paul2463 - so you might have to show us some of it ...[/quote]Hi, Thanks for everyone's help! My friend has just help me to put my site on MySQL 4.0 (a new host server company).May Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-91466 Share on other sites More sharing options...
paul2463 Posted September 14, 2006 Share Posted September 14, 2006 Hmmmmm a problem still exists I think and not all servers will stay on MySQL 4.0 for ever, so maybe a bit of work trying to figure out the compatibility problems would be a good idea anyway. make you a more rounded MySQL and PHP user and you will be so proud of yourself for making it work...think about it anyway... Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-91561 Share on other sites More sharing options...
phpdeveloper2006 Posted September 14, 2006 Author Share Posted September 14, 2006 After upload all files to the new server which running MySQL 4.0. But I get the following error messages:Warning: mysql_connect(): Access denied for user: 'weekmar1_notname@localhost' (Using password: YES) in /home/weekmar1/public_html/new/thxree.inc on line 2Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/weekmar1/public_html/new/thxree.inc on line 3Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/weekmar1/public_html/new/co1.php on line 91Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/weekmar1/public_html/new/co1.php on line 92Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/weekmar1/public_html/new/teama.php on line 86Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/weekmar1/public_html/new/teama.php on line 87Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/weekmar1/public_html/new/we1.php on line 78Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/weekmar1/public_html/new/we1.php on line 79If you have any suggestions on how to fix these errors. Then please let me know. Thanks. Please note that there is no problem for my PHP site running on MySQL 4.0 on an old server.Thanks,May Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-91786 Share on other sites More sharing options...
AndyB Posted September 14, 2006 Share Posted September 14, 2006 The first error message is telling you all you need to know. Your db connection variables do not match for the hostname, dbname, password, username or whatever. Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-91787 Share on other sites More sharing options...
phpdeveloper2006 Posted September 14, 2006 Author Share Posted September 14, 2006 I have just found out that my friend has not created any database tables on the new server. What is the best way to transfer all the data from an old server to the new server?Thanks,May Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-91875 Share on other sites More sharing options...
mainewoods Posted September 14, 2006 Share Posted September 14, 2006 if the phpmysqladmin program is running on your current system then you can just use the export function of that interface to export both the db structure and data to a csv file or sql files. If not then you can write your own sql statement and mysql_query() it to output the table structure(use 'SHOW CREATE TABLE' Syntax) and/or output a a csv file. http://dev.mysql.com/doc/refman/5.0/en/select.html-read the part of that SELECT doc for the phrase '[INTO OUTFILE 'file_name' export_options' Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-91915 Share on other sites More sharing options...
karthikeyan_coder Posted September 14, 2006 Share Posted September 14, 2006 try to move the contents of the folder /mysql/data to your new server's data dir of mysql.. Quote Link to comment https://forums.phpfreaks.com/topic/20532-mysql-problems/#findComment-91929 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.