|
Post by corbinp on Oct 25, 2012 13:16:19 GMT -5
I am having trouble connecting to mysql on isam. The error I am getting tells me the "connected party did not properly respond after a period of time."
Here is my code:
<?php
$DBhost = "isam.sis.pitt.edu"; $DBusername = "ug44"; $DBpassword = "xxx"; $connect = mysql_connect($DBhost, $DBusername, $DBpassword); if (!$connect){ die("Unable to connect to MySQL.<br/>"); } echo "MySQL connection successful.<br/>";
?>
When I run the above code on localhost, I get the error that I mentioned above. When I run the code on paradox, it simply displays a blank page.
If anyone could help, I would be appreciative.
Thanks
Corbin
|
|
pca6
New Member
Posts: 6
|
Post by pca6 on Oct 25, 2012 15:29:53 GMT -5
i thought the host name to be paradox.sis.pitt.edu. you could try it, but i haven't tried either.
|
|
|
Post by corbinp on Oct 25, 2012 16:05:04 GMT -5
That is the unix server, however the host for mysql is isam.sis.pitt.edu (according to the notes).
I am able to connect to this host and mysql thru SSH but unable to when attempting to connect thru php
|
|
|
Post by Bob P on Oct 25, 2012 20:08:40 GMT -5
It should not run on your local. By default your installation on your local if using Xampp is username:root and no password. In class, I turned off the projector in order not to show my password. Plus your host on local is localhost. Now, you can use phpmyadmin to give yourself a new username and add a password but your host will stay localhost. Google 'change password on phpmyadmin Xampp or Wamp or whatever' or use default settings Not sure why paradox is not working. I just tried mine and it connected. Chances are it's a typo somewhere but I didn't see one. So, first step: check and recheck you are using the right username and password. One way to be sure is see if you can log-on with putty or ftp program with those credentials. And, remember your DB name is the same as your username. Sometimes if the obvious gets weird re-type and re-upload, especially if you screen scraped anything. What about file permissions? UPDATE: I uploaded a connect script to your account and everything worked okay - now deleted. So, try again. Bob
|
|
|
Post by corbinp on Oct 29, 2012 12:13:47 GMT -5
Still having issues.
I wrote and uploaded a new script but still cannot connect. This is the error I receive when I run the script to connect to isam:
Error 500. The server experienced an error. Please retry.
File permissions are okay, and my credentials are working as well. I can connect to isam with putty and use mysql through that, but cannot get php to talk to it.
|
|
|
Post by Bob P on Oct 29, 2012 14:58:45 GMT -5
I copied your code and created a file called tester2.php and set the permissions on it and it worked. I left one in your directory test and one in 1059.
Now, why doesn't yours work? Hmmmm, maybe something to do with your ftp program. Did you change settings on ftp or editor? Is it sending the page as binary? Did you scrape anything off of slides? Did you change editors?
Try creating /copying myfile and send with two diff ftp programs and set permissions. See if one works and the other doesn't. Also, do it with diff editors.
OHHH, make sure you cleared your browser cache and you simply weren't running an 'old' file i.e. the original one that may have had an error in it.
Also, set and reset file permissions - sometimes they get kinda 'stuck' even if they look ok. Check them with Putty (ls -a) and compare with what FTP program says.
I'm going with file permissions on this one. Don't always believe what you see. I copied your test program and uploaded to my acct and got the server error message. Then I set the file permissions and everything was ok.
Bob
|
|
|
Post by corbinp on Oct 29, 2012 17:50:00 GMT -5
Interesting, I copied your file and edited it, reuploaded and it works.
Thanks for the help, if I have any additional issues I'll be sure to post them
|
|
|
Post by Lincoln Picot on Dec 9, 2021 0:52:08 GMT -5
Здравствуйте ув. Boss! Предложу поднятие на 10-20 пунктов позиций в поисковиках. Цена всего 400 ру. Качественный ИкС. Отчётность. Прогоны сайтов от Профессионалов! Хваленые БаЗы. Контакты: Telgrm: @exrumer Skype: XRumer.pro WhatsApp: +7(977)536-08-36 mail: support@xrumer.cc
|
|