Current time: 05-01-2024, 09:37 PM Hello There, Guest! (LoginRegister)


Thread Closed 
Can't use string ("") as an ARRAY ref...
Author Message
Norri Offline


Posts: 3
Joined: Aug 2009
Reputation: 0
Post: #1
Can't use string ("") as an ARRAY ref...
Hi there Smile

I've upgraded from VHCS 4.7.1 to ispCP 1.0.0 and everything seems to have gone well except none of my email works and all my subdomain statuses are still set to 'change'.

If I update my domain status to 'change' and then run ispcp-rqst-mngr, I get this error:

Can't use string ("") as an ARRAY ref while "strict refs" in use at /var/www/ispcp/engine/ispcp-rqst-mngr line 190.

Please help! I have no idea where to begin looking to fix this.

PS: I had a few problems running the ispcp-update (during the database part) but I then commented out a number of ALTER statements until it worked. THEN I went back and re-ran all those ALTERS to ensure the correct modifications were done to the database. So I think the database is okay but maybe not.
I'm not much of a Perl programmer but I am a good PHP coder so I added this code to see what's inside those variables:

Code:
use Data::Dumper;
print Dumper $rs;
print Dumper $rdata;
exit;

I added it after this:

Code:
$sql = "select mail_id, mail_acc, status from mail_users where status != 'ok' and status != 'ordered' order by mail_id";
  ($rs, $rdata) = doSQL($sql);

And got this:

Code:
$VAR1 = -1;
$VAR1 = '';

The weird thing is that SAME sql query results in over 20 rows from the mail_users table. So I know it's not empty an, in any case, if it was empty, the second variable above should be 0, not "".

So what do I do now? I really need to get this working soon!
(This post was last modified: 08-03-2009 06:08 PM by Norri.)
08-03-2009 05:38 PM
Find all posts by this user
Norri Offline


Posts: 3
Joined: Aug 2009
Reputation: 0
Post: #2
RE: Can't use string ("") as an ARRAY ref...
Okay, I got a bit further and it doesn't seem to be an ispCP issue after all!

I added:

Code:
warn $main::db->errstr;

before:

Code:
push_el(\@main::el, 'doSQL()', 'ERROR: Incorrect SQL Query -> '.$main::db -> errstr);

in ispcp_common_methods.pl and got:
MySQL server has gone away at /var/www/ispcp/engine/ispcp_common_methods.pl line 295.

Any advice on how to fix this? I don't know much about MySQL :/
I upped the MySQL timeout in my.cnf (after reading this) and it's working! Smile

Hope this helps someone else out there! What a small silly issue and definitely NOT ispCP's fault!
(This post was last modified: 08-03-2009 06:55 PM by Norri.)
08-03-2009 06:40 PM
Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #3
RE: Can't use string ("") as an ARRAY ref...
Great - a self-helper... :-)

Would be good to add this somewhere to the wiki...

/J
08-04-2009 07:34 AM
Visit this user's website Find all posts by this user
Thread Closed 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)