Jump to content


Photo

MySQL problem(s)


  • Please log in to reply
12 replies to this topic

#1 phpdeveloper2006

phpdeveloper2006
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 12 September 2006 - 05:59 PM

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

#2 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 12 September 2006 - 06:02 PM

How about providing us an error message and some code...

Regards
Rich
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools

#3 paul2463

paul2463
  • Members
  • PipPipPip
  • Advanced Member
  • 955 posts
  • LocationUK

Posted 12 September 2006 - 06:58 PM

the only thing I could see in the 4.0 to 4.1 paperwork after a quick look is the following

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.


you cannot affect the past but you can ruin a perfectly good present by worrying about the future

*********************************************************************
The <A HREF="http://www.php.net/d...php">MANUAL</A> is actually a useful resource

#4 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 12 September 2006 - 11:56 PM

maybe they changed the configuration so 'register_globals' is now turned off.
http://www.php.net/m...ity.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:

if (ini_get('register_globals')) {
    echo "'register_globals' is ON";
else
    echo "'register_globals' is OFF";


#5 phpdeveloper2006

phpdeveloper2006
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 13 September 2006 - 02:07 AM

How about providing us an error message and some code...

Regards
Rich


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

#6 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 13 September 2006 - 02:42 AM

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 ...
Legend has it that reading the manual never killed anyone.
My site

#7 phpdeveloper2006

phpdeveloper2006
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 September 2006 - 01:39 AM

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 ...


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

#8 paul2463

paul2463
  • Members
  • PipPipPip
  • Advanced Member
  • 955 posts
  • LocationUK

Posted 14 September 2006 - 06:56 AM

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...
you cannot affect the past but you can ruin a perfectly good present by worrying about the future

*********************************************************************
The <A HREF="http://www.php.net/d...php">MANUAL</A> is actually a useful resource

#9 phpdeveloper2006

phpdeveloper2006
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 September 2006 - 03:22 PM

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


#10 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 14 September 2006 - 03:25 PM

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.
Legend has it that reading the manual never killed anyone.
My site

#11 phpdeveloper2006

phpdeveloper2006
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 September 2006 - 06:27 PM

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


#12 mainewoods

mainewoods
  • Members
  • PipPipPip
  • Advanced Member
  • 685 posts
  • LocationMaine

Posted 14 September 2006 - 07:13 PM

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.../en/select.html
-read the part of that SELECT doc for the phrase '[INTO OUTFILE 'file_name' export_options'


#13 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 14 September 2006 - 07:32 PM

try to move the contents of the folder /mysql/data to your new server's data dir of mysql..
www.karthi.us




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users