Issue with Setting up Job Tables/first job(s)

Post your support requests/solutions for phpJobScheduler [website]
ibellach - uwnyc.org
Working towards guru status...
Working towards guru status...
Posts: 9
Joined: Tue Jan 04, 2011 11:44 pm
Location: 0
Contact:

Issue with Setting up Job Tables/first job(s)

Postby ibellach - uwnyc.org » Tue Jan 04, 2011 11:50 pm

When I attempted to complete step 6 (add jobs): site.../phpjobscheduler/pjsfiles/?add=1

I rec'd the following messages:


Warning: mysql_field_len(): supplied argument is not a valid MySQL result resource in /home3/syosseta/public_html/IBDB/phpjobscheduler/pjsfiles/functions.php on line 78

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home3/syosseta/public_html/IBDB/phpjobscheduler/pjsfiles/functions.php on line 80

And the required tables were not created in my MySQL database.

Any suggestions would be most helpful! Thanks in Advance! Ira :?:

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1809
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby davidgwalker » Wed Jan 05, 2011 2:08 pm

Hi and Welcome to the forums,

I have had a look at this and can not currently replicate the error... :roll:

The server I have just correctly installed it is running:
PHP version 5.2.9 and MySQL version 5.1.32
(works fine on earlier versions too)

Please let me know what your server is running and what os?

Cheers

Dave

ibellach - uwnyc.org
Working towards guru status...
Working towards guru status...
Posts: 9
Joined: Tue Jan 04, 2011 11:44 pm
Location: 0
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby ibellach - uwnyc.org » Wed Jan 05, 2011 2:29 pm

I am hosted at Hostmonster.com, running LINUX / Apache.

PHP ver = 5.2.14 and MySQL ver = 5.1.47

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1809
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby davidgwalker » Wed Jan 05, 2011 2:36 pm

The highest I can goto currently is:
MySQL 5.1.41
PHP 5.3.1

I will install these and test it now.....

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1809
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby davidgwalker » Wed Jan 05, 2011 3:03 pm

Its the newer version of MySQL which is stopping the install.

I will have a look at it over the next week and post a patch soon.....

ibellach - uwnyc.org
Working towards guru status...
Working towards guru status...
Posts: 9
Joined: Tue Jan 04, 2011 11:44 pm
Location: 0
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby ibellach - uwnyc.org » Wed Jan 05, 2011 3:28 pm

Is there anything I can pose to the Host to enable the install?
How about if I create the tables on the backend?
Thanks, Dave!

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1809
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby davidgwalker » Wed Jan 05, 2011 3:48 pm

Right after a little more testing I found it works fine upto MySQL 5.1.40.
Any higher and it stops working :x

Dont know why as yet, sorry. More testing to do.

So ask your host if they have a server on MySQL 5.1.40 (or lower)

I use http://www.wampserver.com on my test server as swiching up and down versions is easier, but it often lags behind a bit when it comes to newer versions of MySQL/PHP...

Cheers

Dave

ibellach - uwnyc.org
Working towards guru status...
Working towards guru status...
Posts: 9
Joined: Tue Jan 04, 2011 11:44 pm
Location: 0
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby ibellach - uwnyc.org » Wed Jan 05, 2011 8:03 pm

Dave, My host only has MySQL 5.1.47 available.

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1809
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby davidgwalker » Thu Jan 06, 2011 8:38 am

All I can suggest is you try and install it manually - see the functions.php for the simple SQL it uses.

I will have a closer look next week when I have time to mess about upgrading my test server (which usually breaks everything else so takes hours! Boohoo).

Cheers

Dave

ibellach - uwnyc.org
Working towards guru status...
Working towards guru status...
Posts: 9
Joined: Tue Jan 04, 2011 11:44 pm
Location: 0
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby ibellach - uwnyc.org » Thu Jan 06, 2011 11:25 am

will do - thanks.

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1809
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby davidgwalker » Fri Jan 07, 2011 10:48 am

Found the issue. MySQL is not returning a resource id following a call to connect via mysql_connect.

To get around the bug edit the file functions.php and replace the db_connect function with:

Code: Select all

function db_connect()
{
 global $db_link;
 $db_link = @mysql_connect(DBHOST, DBUSER, DBPASS);
 @mysql_select_db(DBNAME);
 if (mysql_error())
 {
  if (SHOW_MYSQL_ERRORS) echo "MySQL error: ". mysql_error(). " MySQL error no: ".mysql_errno();
  exit;
 }
}


All the best, thanks for highlighting the bug - I will issue an upgrade next week.

Dave

ibellach - uwnyc.org
Working towards guru status...
Working towards guru status...
Posts: 9
Joined: Tue Jan 04, 2011 11:44 pm
Location: 0
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby ibellach - uwnyc.org » Fri Jan 07, 2011 11:26 am

I was going to attempt to jumpstart by doing backend SQLs today since I had some extra time. I will try your fix and let you know how it works out.

Thank you, Dave!

ibellach - uwnyc.org
Working towards guru status...
Working towards guru status...
Posts: 9
Joined: Tue Jan 04, 2011 11:44 pm
Location: 0
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby ibellach - uwnyc.org » Fri Jan 07, 2011 2:13 pm

Hey Dave -

Made dbconnect code change as you directed.
I did not receive any dbconnect error msg so I would assume I connected ok.
But I did get the same error msgs as before:

Warning: mysql_field_len(): supplied argument is not a valid MySQL result resource in /home3/syosseta/public_html/IBDB/phpjobscheduler/pjsfiles/functions.php on line 78

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home3/syosseta/public_html/IBDB/phpjobscheduler/pjsfiles/functions.php on line 80

I am going to try to back end create these tables.

Ira

ibellach - uwnyc.org
Working towards guru status...
Working towards guru status...
Posts: 9
Joined: Tue Jan 04, 2011 11:44 pm
Location: 0
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby ibellach - uwnyc.org » Fri Jan 07, 2011 3:51 pm

Dave -

I successfully created the tables on the back end!
And added a job - waiting for it to fire - so far so good.

Ira

davidgwalker
MODS thats what I do that is! But definately NO mod music! It has to be ROCK!
Posts: 1809
Joined: Mon Oct 25, 2004 8:20 pm
Location: Huddersfield, UK
Contact:

Re: Issue with Setting up Job Tables/first job(s)

Postby davidgwalker » Mon Jan 17, 2011 2:48 pm

I am still trying looking into this but it seems the newest version of MySQL is a bit problematic!

Is it now working for you Ira?

Note: All my apps will work fine on the stable versions of PHP and MySQL most hosts currently use such as this MySQL host.

All the best

Dave


Return to “phpJobScheduler [forum]”

Who is online

Users browsing this forum: No registered users and 3 guests