Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
godaddy users operating PHP scripts
Old 03-06-2008, 10:42 PM godaddy users operating PHP scripts
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
Which folder(s) do you put your PHP scripts in to?
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-06-2008, 11:04 PM Re: godaddy users operating PHP scripts
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
They go with all of the other public html files public_html
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 03-07-2008, 03:12 AM Re: godaddy users operating PHP scripts
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
Where is your public_html file folder located?

In your File Manager? I ask because when I got godaddy.com, it didn't come with a public_html folder.
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 03-07-2008, 08:18 AM Re: godaddy users operating PHP scripts
Defies a Status

Posts: 1,606
Trades: 0
With GD when you ftp in you are in your public_html directory. You will never see that name and I am not sure what their control panel calls it.

PHP scripts will run in any directory you can reach via ftp.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 03-07-2008, 09:32 PM Re: godaddy users operating PHP scripts
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
Alright.

So i'm trying to get this PHPscript to run on my website...

<?php $link = mysql_connect('XXXXXXX', 'mysql_XXXXXX', 'mysql_XXXXXXX') or die("Could not connect: ".mysql_error());
$db_select = mysql_select_db('XXXXXXXXX',$link) or die("Could not select: ".mysql_error());
$max =2;//Set this to how many images you have.
$d=date("z");
$query = "SELECT * FROM `updated`";
$result = mysql_query($query);
$l = mysql_fetch_array($result);
if($d > $l[0] || ($d == 0 && $l[0] == 365)){
$img = rand(1,$max);
$query = "UPDATE TABLE `updated` SET updated = $d && image = $img where updated= $l[0]";
$result = mysql_query($query);
$query = "SELECT * FROM `images` where image=$img";
$result = mysql_query($query);
$array = mysql_fetch_array($result);
echo '<a href="'.$array[2].'"><img src="images/'.$array[1].'" alt="Daily Image"></a>';
}
else{$query = "SELECT * FROM updated, images WHERE updated.image = images.image";
$result = mysql_query($query);
$array = mysql_fetch_array($result);
echo '<a href="'.$array[4].'"><img src="images/'.$array[3].'" alt="Daily Image"></a>';}
mysql_close($link);?>



I've already populated the necessary tables on MySQL. And i've even uploaded this PHPscript to my public_html directory using my FTP client.

I then place the PHPscript into my website page, and it's just supposed to work; Right?! but it isn't. So i'm confused here, and I don't know what i'm doing wrong.
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE

Last edited by Lashtal; 03-07-2008 at 10:22 PM..
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 03-07-2008, 11:45 PM Re: godaddy users operating PHP scripts
Average Talker

Posts: 20
Name: Shane
Trades: 0
Quote:
Originally Posted by Lashtal View Post
Alright.

So i'm trying to get this PHPscript to run on my website...

<?php $link = mysql_connect('XXXXXXX', 'mysql_XXXXXX', 'mysql_XXXXXXX') or die("Could not connect: ".mysql_error());
$db_select = mysql_select_db('XXXXXXXXX',$link) or die("Could not select: ".mysql_error());
$max =2;//Set this to how many images you have.
$d=date("z");
$query = "SELECT * FROM `updated`";
$result = mysql_query($query);
$l = mysql_fetch_array($result);
if($d > $l[0] || ($d == 0 && $l[0] == 365)){
$img = rand(1,$max);
$query = "UPDATE TABLE `updated` SET updated = $d && image = $img where updated= $l[0]";
$result = mysql_query($query);
$query = "SELECT * FROM `images` where image=$img";
$result = mysql_query($query);
$array = mysql_fetch_array($result);
echo '<a href="'.$array[2].'"><img src="images/'.$array[1].'" alt="Daily Image"></a>';
}
else{$query = "SELECT * FROM updated, images WHERE updated.image = images.image";
$result = mysql_query($query);
$array = mysql_fetch_array($result);
echo '<a href="'.$array[4].'"><img src="images/'.$array[3].'" alt="Daily Image"></a>';}
mysql_close($link);?>



I've already populated the necessary tables on MySQL. And i've even uploaded this PHPscript to my public_html directory using my FTP client.

I then place the PHPscript into my website page, and it's just supposed to work; Right?! but it isn't. So i'm confused here, and I don't know what i'm doing wrong.
What happens? Do you see plain text, error message, or nothing at all?
Demexii is offline
Reply With Quote
View Public Profile
 
Old 03-08-2008, 04:46 AM Re: godaddy users operating PHP scripts
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
I've captured a screenshot of the error on a loaded page to show ya' what I end up with...



beats the heck out of me. Any advice?
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 03-08-2008, 08:34 AM Re: godaddy users operating PHP scripts
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
PHP requires the server to parse the script files, so you will need to view the page directly from the live server instaed of the local file itself.

http://www.domain.com/page.php

Also, in order for the server to parse PHP files, the page extention needs to be .php
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 03-08-2008, 11:24 AM Re: godaddy users operating PHP scripts
Defies a Status

Posts: 1,606
Trades: 0
That SS is from your local computer. Fairly sure GD blocks remote sql access.

If you get an error when you run it live "on site" post that screen shot and try to make it a little bigger. That one was hard to read.

BTW, you did catch the fact that GD does not use localhost as the host? It is something in the format of mysql21.somename.com.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 03-08-2008, 05:04 PM Re: godaddy users operating PHP scripts
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
mgraphic, I now officially got everything you said covered.

colbyT, said "you did catch the fact that GD does not use localhost as the host? It is something in the format of mysql21.somename.com"

I just figured that out, thanks to you for telling me.

So I did as you said and posted it "on site", loading the script as .php using my FTP client.

I named the file "gallery.php" and so I entered: www.mydomain.com/Gallery.php

and I get this error message: "Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client"

What the heck?
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 03-08-2008, 06:16 PM Re: godaddy users operating PHP scripts
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
So I phoned the TechSupport at GoDaddy.com and he says I have to upgrade my 4.1 MySQL server to version 5.0 (I proceed to do this)

Which means I have to recreate my tables by hand, or so he said. I'm new at this, so i'm going to trust every word he says (proceeds to do this as well and Done.)

Okay, funny story; I get the same error message again!

"Could not connect: Client does not support authentication protocol requested by server; consider upgrading MySQL client"

uh, What the Heck?!
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 03-08-2008, 06:23 PM Re: godaddy users operating PHP scripts
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,918
Name: Keith Marshall
Location: Connecticut
Trades: 0
In your GoDaddy host control panel, can you remove the current user for the database and recreate a new one?
__________________

<mgraphic /> - I don't have a solution but I admire the problem.
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 03-08-2008, 06:28 PM Re: godaddy users operating PHP scripts
Gilligan's Avatar
Website Designer

Posts: 1,670
Name: Stefan
Location: London, UK
Trades: 0
Try updating your php version also.

Check was version you currently have like so.

in a new file (call it whatever you like, but make sure the extension is .php) use this code.

PHP Code:
<?php 

phpinfo
();

?>
Then view the page live on the server
Gilligan is offline
Reply With Quote
View Public Profile
 
Old 03-08-2008, 06:31 PM Re: godaddy users operating PHP scripts
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
What I meant to say was: My MySql Database was once called Jeff, and he was installed at Version 4.1

I then had to delete Jeff to create a 5.1 version GussGuss.

Yep, you can delete a My_SQL database or make new ones. By simply clicking on "Create Database" you create a new onw; you can also delete one by clicking on the "X" icon next to the pencil icon before you click "Open Manager"
---------------------------------------------------

You wouldn't happen to have the miracle answer to my query, would you? ??
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 03-08-2008, 06:33 PM Re: godaddy users operating PHP scripts
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
Gilligan,

See, I already know which version I had.

I had Version 4.1, which I killed. I then recreated everything on Version 5.0

any other Troubleshooting suggestions I ought to be considering here?
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 03-09-2008, 10:40 AM Re: godaddy users operating PHP scripts
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
I wonder if there is another way for me to be able to connect to MySQL by utilizing a differant "Authentication Protocal" in my Script than the one I am currently using...
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 03-09-2008, 06:56 PM Re: godaddy users operating PHP scripts
Defies a Status

Posts: 1,606
Trades: 0
I searched Google for your error message since I had never heard of it before.

This page said this:
Quote:
This happens because the latest versions of MySql uses a new format for the password (it's a longer hash). In order for old clients to continue to use the newer server, you have to set the passwords on the server to their old format or upgrade your client. Because upgrading the client can sometimes be a pain, it's often easier to just update the passwords to the old format on the server.
Whether that helps or not I don't know. Does this script even use a password?

I see a lot of images mentioned in your code. If this is the Gallery script you may want to read this page.

Hope this helps.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 03-09-2008, 07:46 PM Re: godaddy users operating PHP scripts
Lashtal's Avatar
wherenomanhasgonebefore

Posts: 680
Name: Lashtal
Trades: 0
I was looking a bit at this link also: http://www.digitalpeer.com/id/mysql

It contains some of the information in the link you just sent to me.

I'll need to set some time aside to read a little more about it.

Anybody else here familiar with this issue?
__________________
Currently Reading:
Please login or register to view this content. Registration is FREE
Lashtal is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to godaddy users operating PHP scripts
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.46743 seconds with 12 queries