Jump to content

I bought a broken script and the seller has disappeared. Any Help Please


Waverlymain

Recommended Posts

Sorry if I posted this in the wrong place.

I recently paid for a script. Once I finally received it an uploaded it there was an error the very first time I looked at my webpage. (The wife warned me to not buy it.)

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in/home/content/23/8334523/html/mywebsite.com/inc/valuescript.func.phpon line 571

 

The page this script shows on is only one page. There is a input box then there are three boxes underneath it. The error code shows in all three.

Box 1 is for most viewed

Box 2 is for recently updated

Box 3 is for new results

If I enter something into the input box I get the same error code as above but it does go to a new page but it is just a white page with no of the items from the original page.

I know very little to nothing about php and a little more about html. I am using web expression as my editor.

Here is the code from area around line 571. Was not sure what to post to give enough info to get some help with this. I also attached a screenshot.

 

 

if($type=="MostViewed")

$sql = mysql_query("SELECT * FROM `websites` ORDER BY `TotalViews` DESC LIMIT $max");

 

if($type=="NewSites")

$sql = mysql_query("SELECT * FROM `websites` WHERE `NewMark`='1' ORDER BY `LastUpdate` DESC LIMIT $max");

 

while ($row = mysql_fetch_array($sql)) { <This is line 571>

$i++;

$item_array = array(

"%id%",

"%website%",

"%link%"

);

$replace_array = array(

$i,

"www.".$row["Domain"],

$SiteUrl."www.".$row["Domain"]

);

 

$tmp .= str_replace($item_array, $replace_array, $itemhtml);

}

return $tmp;

}

 

 

 

Thank you for any help I might be able to get with this. Nothing worst then paying for something the it does not work and the seller is not returning any of my emails and the wife is giving me the "I Told You So"....

 

Stay @ Home Dad

post-136451-0-97870500-1357792433_thumb.jpg

Link to comment
Share on other sites

That error message indicates that the query failed. This does not necessarily mean there's an error in the query. You might also notice that it's a warning. For someone like yourself, there isn't much value in having your error level set to log warnings. It's not like you are going to take action based on php warning you about potential issues you don't understand and aren't going to do anything to change.

 

There are a lot of things that can go wrong when you're first setting up a system that has database connectivity. It could be that the script is not configured correctly to connect to the database (host,username,password). The database name could be wrong, and/or the table that is being referenced in the query could be missing.

 

Any of these issues could make the script produce the warning at that point. My bet, given what little info you've provided, is that the script is not actually making a mysql connection, and thus none of the queries are going to work until you figure that out.

Link to comment
Share on other sites

I was having some issues with the DB not connecting in the beginning so I kept changing things till I finally got the page to at least show something. In the beginning I was getting a 404 error I believe sorry its been a few hours. So once it finally showed the input box etc... I thought I had the db name and path correct.

 

Then after some changes I was able to get the page to show up, which lead me to think it was working.

 

 

What can I post here to make it easier to maybe understand the issue I am having with this script. I would have posted more but I was not sure what would be to much info to post here. I am new and I know some forums are very tight on what can or cannot be posted.

 

 

This is the instructions it came with:

1 Edit "config.php" to reflect your requirements

2 Create mysql database "valuedb"

3 Go to http://yourwebsite/install/ and wait until database will be installed.

(please note: database installation may occupy a several minutes, be patient)

That's all!

 

 

I could never really understand or get it to load on /install/ every time I put my address in with the "/install/" I would get this error.

 

 

Warning: require_once(../inc/valuescript.func.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/23/8334523/html/xxxxxxxxx/index.php on line 5

 

Fatal error: require_once() [function.require]: Failed opening required '../inc/valuescript.func.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/23/8334523/html/xxxxxxxx/index.php on line 5

 

 

 

This is how the file looked once I unzipped it.

 

File called " Upload"

 

Inside it was 3 folders:

Folder 1- img

 

Folder 2- inc

Contains:

1- .htaccess

2- valuescript.func

 

Folder 3- installation

Contains:

1-index.php

2- sites - this is a Microsoft excel file

3- sitesx - this is a Microsoft excel file

 

 

Then there were several other items that were not folders:

1-.htaccess

2- config.php

3- default.css

4- getdata.php

5- index.php

6- niftycorners.css

7- niftycube.js

8- siteinfo.php

 

 

Recap after unzipped:

Parent Folder: Upload

Folder: Img

Folder: Inc

Folder: installation

1-.htaccess

2- config.php

3- default.css

4- getdata.php

5- index.php

6- niftycorners.css

7- niftycube.js

8- siteinfo.php

 

Thank You again

Edited by Waverlymain
Link to comment
Share on other sites

Sorry the above error code was wrong. This is the error code I get when I put something in the input box then hit calculate.

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/23/8334523/html/xxxxxxxx/inc/valuescript.func.php on line 592

 

Warning: Cannot modify header information - headers already sent by (output started at /home/content/23/8334523/html/xxxxxxxx/inc/valuescript.func.php:592) in /home/content/23/8334523/html/xxxxxxxxx/getdata.php on line 55

Edited by Waverlymain
Link to comment
Share on other sites

here is my observation

 

Failed opening required '../inc/valuescript.func.php'

 

so your script is looking for valuescript.func.php , and I see the file listed in the inc folder is just

valuescript.func

 

solution: rename valuescript.func to valuescript.func.php and see if it works

Link to comment
Share on other sites

Thank you QuickOldCar for replying.

 

The file is named that already. Sorry I didn't realize I did not put the .php on the name above.

 

I am still getting the same error code:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/content/23/8334523/html/WebsiteworthBiz/inc/valuescript.func.php on line 592

 

above in the error code where my domain name is listed there is no dot between the domain name and the extension .BIZ, is this normal since it's just an error code is there an issue in that as well.

 

You can view the error code here:

websiteworth.biz

 

I am at a lost and cannot seem to fix this. I paid for something I guess I should have not paid for but when you don't know how to create a script who can you turn to, to buy a script from a honest and professional source?

 

Thank you again for any help I can get with this, I can send you the file if anyone wants it to look at and maybe can see where the issue is better.

Link to comment
Share on other sites

@ PFMaBiSmAd, I am sorry, I miss understood your post above after I read it the other day.

 

Do I just copy and paste " echo mysql_error(); "​ basically on line 593 ?

 

Sorry if that sounds like a dumb question I am really a noob when it comes to php.

 

Thank you for replying back after I miss understood your post above.

Link to comment
Share on other sites

You could always try that to see if it does what you want.

 

One of the points of programming is you can immediately observe the result of a theory. So, unless you are programming the controls for something where someone could get hurt by an incorrect result, it usually doesn't hurt to just try something and observe what it does.

Link to comment
Share on other sites

Waverlymain,

 

Looking at the flailing going on it's pretty clear to me that this thread is going nowhere fast.

 

My expert opinion is that you should engage an expert at this point to get your script up and running. You can post for help like this in our jobs subforum or use any of the many services out there that typically cater to offshore people.

 

What you need to be prepared to do is have all the credentials and access information for your server.

 

Unless there are significant issues with the script you bought, (in which case, we can't help you either), this looks to be a system administration/ configuration problem, and as such, it's not of general interest to the community at large. We run this community to help developers improve their skills, not as a way of providing non-programmer/business owners and way to get access to free technical support and consulting.

 

Please understand that most of the people who answer questions on this forum are professional developers, and it's simply not fair to them to allow a thread like this to continue, as it's against our community guidelines, not to mention excruciating to observe. Someone who knows what they are doing would have this problem sorted out in 15 minutes (assuming they already had all the access they needed).

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

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.