Jump to content

Archived

This topic is now archived and is closed to further replies.

phpdeveloper2006

MySQL problem(s)

Recommended Posts

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

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
[quote author=HuggieBear link=topic=107809.msg432919#msg432919 date=1158084135]
How about providing us an error message and some code...

Regards
Rich
[/quote]

Hi Rich,

Sorry there is no error message. My PHP site still runs on MySQL 4.1 without any problem. The data just
does not come from the MySQL 4.1.

Thanks,
Jimmy

Share this post


Link to post
Share on other sites
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 ...

Share this post


Link to post
Share on other sites
[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

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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 2

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/weekmar1/public_html/new/thxree.inc on line 3


Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/weekmar1/public_html/new/co1.php on line 91

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/weekmar1/public_html/new/co1.php on line 92



Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/weekmar1/public_html/new/teama.php on line 86

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/weekmar1/public_html/new/teama.php on line 87


Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/weekmar1/public_html/new/we1.php on line 78

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/weekmar1/public_html/new/we1.php on line 79

If 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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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'

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.