Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> SQL Doesn't Connect In PHP Script, I made some code updates now the script is broken.
Eggie
post Jan 30 2008, 11:21 PM
Post #1


Advanced Member
Group Icon

Group: Members
Posts: 131
Joined: 19-January 08
From: Zagreb/Croatia
Member No.: 27,735



i have created a website and it is not working properly...
i have had a website on sphosting.com and everything worked fine till i got some errors(i got the errors because of the crappy host)...now the fun part starts...they said they solved the problem but i got another one..i said them to repair it again and they did...now i tried to login but as i entered the info it said the info isn't correct...i checked the SQL and everything seemed fine..i tried again and again the error came...i tried than to register,entered ALL info and when this was suppose to come out "You have now registered to play $gamename. Please check you e-mail for the verification link. E-mail can take up to 24 hours to recieve, please be patient" the register.php was there again ...
i uploaded the script that I KNOW that worked fine before i made major updates on the scripts and it didn't work...
i changed my host and installed the newer script and the let me call it "default" script and none worked...

i think the problem could be that it doesn't connect to my database correctly but the news on the index.php is in the database and it's correctly shown without any problems...i even tried the
CODE
echo mysql_error();
and it didn't work
does anyone have time to see my scripts and see what is wrong??
EDIT:BTW:i use p_connect for connecting to my database

This post has been edited by Eggie: Jan 30 2008, 11:22 PM
Go to the top of the page
 
+Quote Post
vujsa
post Jan 31 2008, 06:47 AM
Post #2


Absolute Newbie
Group Icon

Group: Admin
Posts: 887
Joined: 20-February 05
From: Indianapolis, Indiana, USA (Midwest)
Member No.: 2,714



QUOTE(Eggie @ Jan 30 2008, 06:21 PM) *
i have created a website and it is not working properly...
i have had a website on sphosting.com and everything worked fine till i got some errors(i got the errors because of the crappy host)...now the fun part starts...they said they solved the problem but i got another one..i said them to repair it again and they did...now i tried to login but as i entered the info it said the info isn't correct...i checked the SQL and everything seemed fine..i tried again and again the error came...i tried than to register,entered ALL info and when this was suppose to come out "You have now registered to play $gamename. Please check you e-mail for the verification link. E-mail can take up to 24 hours to recieve, please be patient" the register.php was there again ...
i uploaded the script that I KNOW that worked fine before i made major updates on the scripts and it didn't work...
i changed my host and installed the newer script and the let me call it "default" script and none worked...

i think the problem could be that it doesn't connect to my database correctly but the news on the index.php is in the database and it's correctly shown without any problems...i even tried the
CODE
echo mysql_error();
and it didn't work
does anyone have time to see my scripts and see what is wrong??
EDIT:BTW:i use p_connect for connecting to my database

Well, just looking at your method, I have no idea what p_connect is!

Did you mean pg_connect or pg_pconnect?
If so, those are for PostgreSQL Databases which are different than MySQL databases!

Anyway, nobody will be able to help you with your problem without seeing some code. Additionally, this sounds more like a PHP issue than a SQL problem.

vujsa
Go to the top of the page
 
+Quote Post
yordan
post Jan 31 2008, 10:44 AM
Post #3


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 1,980
Joined: 16-August 05
Member No.: 7,896



Maybe one simple test could be to use phpMyadmin with this user's name and password, in order to see if the user exists.
then, you should also verify that the user's tables still exist and have rows.
Go to the top of the page
 
+Quote Post
Eggie
post Jan 31 2008, 02:19 PM
Post #4


Advanced Member
Group Icon

Group: Members
Posts: 131
Joined: 19-January 08
From: Zagreb/Croatia
Member No.: 27,735



QUOTE(yordan @ Jan 31 2008, 11:44 AM) *
Maybe one simple test could be to use phpMyadmin with this user's name and password, in order to see if the user exists.
then, you should also verify that the user's tables still exist and have rows.

i checked sql database and there is that table...but no information in it after i register a account...

@vujsa: mysql_pconnect("","",""); i meant i use that smile.gif and for the code-i asked if someone wants i can grant him my account information so he can check it if he wants... but i ain't gonna post it on the forum tongue.gif
Go to the top of the page
 
+Quote Post
yordan
post Jan 31 2008, 02:37 PM
Post #5


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 1,980
Joined: 16-August 05
Member No.: 7,896



QUOTE
mysql_pconnect("","",""); i meant i use that and for the code-i asked if someone wants i can grant him my account information so he can check it if he wants...

I guess that vujsa wanted to have some lines from your php source code around the "connect" word, in order to see what could explain not being conneted. The username and passord is here a useless detail, the important thing is the syntax of the php lines trying to connect. Or you can, as usual, say myname/blahblah or blah/password, just to explain where you put the password.
As a matter of example, when I talk with my Oracle support I say "I try sqlplus blah/brol ", and everybody knows that here "blah" stands for my username and "brol" replaces my secret password. And the syntax sqlplus blah/brol has to be accepted unless the RDBMS system is down.
Go to the top of the page
 
+Quote Post
Eggie
post Jan 31 2008, 02:48 PM
Post #6


Advanced Member
Group Icon

Group: Members
Posts: 131
Joined: 19-January 08
From: Zagreb/Croatia
Member No.: 27,735



i meant that i will give you my Cpanel login information if you want to help me so i don't need to copy the entire page of "config.php" or "register.php" because it will be too long and people will think that i'm doing it for credits which i wouldn't like (but i can do it if you want me to) and i will be denied once more for the hosting and i don't want that
Go to the top of the page
 
+Quote Post
yordan
post Jan 31 2008, 02:52 PM
Post #7


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 1,980
Joined: 16-August 05
Member No.: 7,896



OK, you are right. vujsa will PM you if he prefers working that way.
Go to the top of the page
 
+Quote Post
Eggie
post Jan 31 2008, 03:18 PM
Post #8


Advanced Member
Group Icon

Group: Members
Posts: 131
Joined: 19-January 08
From: Zagreb/Croatia
Member No.: 27,735



QUOTE(yordan @ Jan 31 2008, 03:52 PM) *
OK, you are right. vujsa will PM you if he prefers working that way.

Can't you help me?tongue.gif
i would like help from anyone only if he's not so stupid that he steals my scripts or delete my hosting plan but i think that noone will...i believe that people won't fool me:) i hope i'm right
Go to the top of the page
 
+Quote Post
yordan
post Jan 31 2008, 03:26 PM
Post #9


Way Out Of Control - You need a life :)
Group Icon

Group: [MODERATOR]
Posts: 1,980
Joined: 16-August 05
Member No.: 7,896



QUOTE
Can't you help me?

I would if I could. Unfortunately, I'm not a king in php. I'm only able to use the automatic scripts within the astahost cpanel, where you have nothing to do except giving your account name and password. So, if something is wrong inside one of your scripts, let's wait until one of the php gods around here come and have a look.
Go to the top of the page
 
+Quote Post
faulty.lee
post Jan 31 2008, 04:27 PM
Post #10


Premium Member
Group Icon

Group: [HOSTED]
Posts: 478
Joined: 5-November 06
Member No.: 17,016



I think you should give a clearer picture of what's your situation and the error message you're getting. I'm guessing that the script you're referring to is a game engine or sort of alike. And now you're facing the problem of connecting to your SQL database? But the previous problem with your hosting wasn't clear at all, are they also related to the SQL problem? What kind of error was that? Maybe with more information we can help you narrow down your problem.

We don't actually need your login to see your code. We actually prefer for you too look into it yourself, while we provide you some guidance, that way you can learn better, and be able to tackle any future problem. I'm sure they'll be more problem coming along if you're doing programming.

Anyway, for troubleshooting, you should try to eliminate the problem one by one. For example, now that you cannot connect. Maybe you can create a simple page, with just a few line of code to connect to you SQL database, and see if it works. This will confirm that your username, password and database is correctly configured. If not, you can also try diff method of connecting, to eliminate problem from a particular SQL library. So the list goes one, until you are left with 1 or more item that's contributing to the problem. Then you can start to think of a solution, including "shooting" at your hosting.

Good Luck
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Trainable Anti-spam Filter Script(3)
  2. Php Script To Download File From Another Site(9)
  3. Need Help With A PHP - MySQL Registration Script(13)
  4. How Can I Write PHP Code By This Formmail Html(5)
  5. What Would Make A Good Registration Script?(4)
  6. Online Multiplayer Chess Script(2)
  7. Automated File Structure Creation Script(3)
  8. Authentication Script(1)
  9. Login Script(5)
  10. Please Help (php Join Script)(5)
  11. Automatic/remote Php Script Execution(9)
  12. Something Wrong With This Script?(9)
  13. Automated Product Suggestion Script(2)
  14. Run A Script When Expires A Session(6)
  15. Php Script Help(1)
  1. What's Wrong With My Php Webpage?(2)
  2. Warning: Mysql_result(): Supplied Argument Is Not A Valid Mysql Result Resource In ...(4)
  3. Password Recovery Script(6)
  4. Login Script(8)
  5. Free Forum Hosting Type Script Help!(2)
  6. Script Request(2)
  7. Writing And Testing My Own Login Script [solved](20)
  8. Make A Script Run Even If No User Is Online(6)
  9. Php Login Script(0)
  10. Dynamic Php Image And Better Php Code Question(10)
  11. Myspacetv Download Php Script Help(6)
  12. Php Random Selector(2)
  13. Activation Code(7)


 



- Lo-Fi Version Time is now: 7th September 2008 - 01:23 AM