Jump to content


Photo

PHP errors with "Tommy" scripts on Ricky


  • Please log in to reply
7 replies to this topic

#1 allu62

allu62

    Rank I Member

  • Members
  • Pip
  • 36 posts
  • Gender:Male
  • Location:Luxembourg
  • Interests:Desktop programming, website development, photography, social situation and homeless people in my country

Posted 18 September 2019 - 03:31 PM

Hi. I restored the backups from Tommy to Ricky this afternoon, but the PHP scripts do not work anymore. Normally I use Perl, to be honest knowing not lots more than nothing about PHP (but all my MySQL based statistics scripts are in PHP), it's difficult for me to see what the reason may be. Version 5 on one and version 7 on the other server perhaps?

 

Error messages:

  - Call to a member function fetch() on boolean

  - Call to a member function rowCount() on boolean

 

Thanks for help.

 



#2 flazepe

flazepe

    Rank VIII Member

  • Moderators
  • 849 posts
  • Gender:Male

Posted 18 September 2019 - 03:41 PM

The person at https://www.helionet...another-server/ also received similar errors. Not sure if they're related.

Fatal error: Call to a member function fetch_object() on boolean in /home/ryugold/public_html/php/ckeditor/samples/classe-db.php on line 25


#3 wolstech

wolstech

    Rank X Member

  • Root Admin
  • 10,878 posts
  • Gender:Male
  • Location:Pennsylvania

Posted 18 September 2019 - 03:42 PM

Did you edit the scripts to make sure the database name, username, and password are correct? Odds are the database name and username have changed, especially if you didn't reuse your old account's username.

The connect functions for mysql return false when they fail, which would result in you trying to perform queries on false instead of on a connection handle.

Please do not PM me for support. Posting on our forums lets all of us learn.
Do you play Minecraft? | Server Monitors | And the Dumbass of the Decade award goes to...


#4 allu62

allu62

    Rank I Member

  • Members
  • Pip
  • 36 posts
  • Gender:Male
  • Location:Luxembourg
  • Interests:Desktop programming, website development, photography, social situation and homeless people in my country

Posted 19 September 2019 - 02:03 PM

My Ricky username is the same as on Tommy, the database name, too; I recreated the (same) MySQL user. Noticed this morning in phpMyAdmin that the db has been created, but seems not contain any tables. Is this possible, in despite I got a "successful restore" message?

 

I also saw that the PHP version on Ricky is 5. On Tommy, it was 7, wasn't it? That may also give problems with some PHP statements?



#5 allu62

allu62

    Rank I Member

  • Members
  • Pip
  • 36 posts
  • Gender:Male
  • Location:Luxembourg
  • Interests:Desktop programming, website development, photography, social situation and homeless people in my country

Posted 19 September 2019 - 05:31 PM

Not possible to create tables in phpMyAdmin, it seems (cf. attach). Plesae, help...

Attached Files



#6 flazepe

flazepe

    Rank VIII Member

  • Moderators
  • 849 posts
  • Gender:Male

Posted 19 September 2019 - 05:35 PM

That's usually load related, just wait for some time for the load to go down and you should be fine.

#7 allu62

allu62

    Rank I Member

  • Members
  • Pip
  • 36 posts
  • Gender:Male
  • Location:Luxembourg
  • Interests:Desktop programming, website development, photography, social situation and homeless people in my country

Posted 20 September 2019 - 12:08 PM

Thanks. Manually recreated tables, statistics scripts ok now.

Other PHP problem however with my directory listing script (works fine on my local server and worked fine on Tommy): no output at all, no error log found either. May this be related to statements like

  return array($subdirlist, $filelist);
  list($subdirlist, $filelist) = getFileList($dir, 1);

that perhaps do not work or work differently with PHP5?

Sorry, but I've no ideas about this and trying for 2 weeks to get my site running correctly again... Thanks for any suggestions.


 



#8 allu62

allu62

    Rank I Member

  • Members
  • Pip
  • 36 posts
  • Gender:Male
  • Location:Luxembourg
  • Interests:Desktop programming, website development, photography, social situation and homeless people in my country

Posted 22 September 2019 - 12:20 PM

I really appreciated if someone could give me some advice concerning my PHP problems. Please ... I really need my site running properly again...

 

Also problems with Perl scripts based on the Chart module. This module wasn't originally installed on Tommy, but the admin had the kindness to install it, when I asked how I could use it. On Ricky, now, no chart at all. Scripts not working here? If the module wasn't installed, I would get a Perl error or a server error 500, wouldn't I?

 

Recreating the MySQL databases using the Restore function in C-panel just creates the db, no tables, no data insert. Is this really only due to the load on Ricky? Is the only possibility to redo all tables and data insert manully again?

 

Thanks...






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users