Thanks for the mysite module which I just installed. I have visited Administer/Modules and do see it as a valid option but when I try to activate it I get the text below. I am using Mysite 5.x-1.8, Drupal 5.1 PHP 5.2.0 MySQL 5.0.32.

Bear iin mind that 0.inc does not exist in the modules/mysite/plugins/type folder but I do have 6 *.inc files; aggregator, blog, book, feed, forum and term. :

    * warning: include_once(modules/mysite/plugins/types/0.inc): failed to open stream: No such file or directory in /big/dom/xxxxxxxx/www/modules/mysite/mysite.module on line 1454.
    * warning: include_once(): Failed opening 'modules/mysite/plugins/types/0.inc' for inclusion (include_path='.:/usr/local/lib/php-pear') in /big/dom/xxxxxx/www/modules/mysite/mysite.module on line 1454.

If I ignore the error and attempt to turn on content for mysite I get the following text when I view My drupal for a user.

    * user warning: Incorrect table name 'dru_a3s5ownerO8stdClass19s3uids11s4names8pcoghlans4passs32deeba02034cd5a38c28181e0cc4f597cs4mails16p' query: LOCK TABLES dru_a3s5ownerO8stdClass19s3uids11s4names8pcoghlans4passs32deeba02034cd5a38c28181e0cc4f597cs4mails16pcoghlanruscoms4modes10s4sorts10s9thresholds10s5themes0s9signatures0s7createds101171061330s6accesss101171300622s5logins101171300408s6statuss11s8timezones618000s8languages0s7pictures0s4inits16pcoghlanruscoms4datas6a0s5rolesa1i2s18authenticatedusers6mysiteO8stdClass6s3uids11s5titles8pcoghlans6layouts7columnss5styles4blues6formats7teaserss6statuss11s4dataa0 WRITE in /big/dom/xxxxxxxx/www/includes/database.mysql.inc on line 172.
    * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':3:{s:5:\"owner\";O:8:\"stdClass\":19:{s:3:\"uid\";s:1:\"1\";s:4 query: UPDATE dru_a:3:{s:5:\"owner\";O:8:\"stdClass\":19:{s:3:\"uid\";s:1:\"1\";s:4:\"name\";s:8:\"pcoghlan\";s:4:\"pass\";s:32:\"deeba02034cd5a38c28181e0cc4f597c\";s:4:\"mail\";s:16:\"pcoghlan@rus.com\";s:4:\"mode\";s:1:\"0\";s:4:\"sort\";s:1:\"0\";s:9:\"threshold\";s:1:\"0\";s:5:\"theme\";s:0:\"\";s:9:\"signature\";s:0:\"\";s:7:\"created\";s:10:\"1171061330\";s:6:\"access\";s:10:\"1171300622\";s:5:\"login\";s:10:\"1171300408\";s:6:\"status\";s:1:\"1\";s:8:\"timezone\";s:6:\"-18000\";s:8:\"language\";s:0:\"\";s:7:\"picture\";s:0:\"\";s:4:\"init\";s:16:\"pcoghlan@rus.com\";s:4:\"data\";s:6:\"a:0:{}\";s:5:\"roles\";a:1:{i:2;s:18:\"authenticated user\";}}s:6:\"mysite\";O:8:\"stdClass\":6:{s:3:\"uid\";s:1:\"1\";s:5:\"title\";s:8:\"pcoghlan\";s:6:\"layout\";s:7:\"columns\";s:5:\"style\";s:4:\"blue\";s:6:\"format\";s:7:\"teasers\";s:6:\"status\";s:1:\"1\";}s:4:\"data\";a:0:{}} SET data = '1171302423', created = 1171300623, expire = 0, headers = '' WHERE cid = 'mysite:1' in /big/dom/xxxxxxxx/www/includes/database.mysql.inc on line 172.

Let me know if you need anything else or I can do anything.

Regards,
Paul

Comments

agentrickard’s picture

Title: Hope this is the right place for this report?! » MySite Installation error, possibly PHP 5.2
Assigned: Unassigned » agentrickard

I have retitled this to be more accurate, I think.

Hm. I haven't tested in PHP 5.2, and that may be the cause of the problem. Let me try a from-scratch install and see what I find.

What happens when you go to: admin/settings/mysite and try to configure the module?

agentrickard’s picture

OK, I just installed both Drupal 5.1 and MySite 5.x.1.8 from scratch using MySQL 4.1.13 and PHP 5.1.6, and I'm not really in position to replicate your install.

I didn't have any trouble. No errors; no warnings. So I suspect issues with the PHP or MySQL version(s).

Can you check a few things for me:

1) Was the {mysite} database table created?
2) Was the {mysite_data} table created?
3) Was the {mysite_content} table created?
4) Where (what path) were you when the first error occured? I assume admin/build/modules, after activating MySite. Is this correct.
5) What path generated the second error? I assume /mysite/1/view. Is this correct?

agentrickard’s picture

More technically:

If you're welling to do some debugging for me, try this:

a) Go to mysite.module in a text editor.
b) find lines 1447-48 in the mysite_load_includes() function.
c) Edit them like so:

      default:
        $list = mysite_get_includes($type, $name);
        break;
    }
  }
  print '<pre>';
  print_r($list);
  print '</pre>';
  if (!empty($list)) {
    foreach ($list as $key => $value) {

d) Navigate to /admin/settings/mysite.
e) There should be a large Array() printed at the top of your page.
f) Copy the entire array as plain text and paste it into a note below.

The array should look like this:

Array
(
    [aggregator] => stdClass Object
        (
            [filename] => sites/all/modules/mysite/plugins/types/aggregator.inc
            [basename] => aggregator.inc
            [name] => aggregator
        )

    [blog] => stdClass Object
        (
            [filename] => sites/all/modules/mysite/plugins/types/blog.inc
            [basename] => blog.inc
            [name] => blog
        )

    [book] => stdClass Object
        (
            [filename] => sites/all/modules/mysite/plugins/types/book.inc
            [basename] => book.inc
            [name] => book
        )

    [feed] => stdClass Object
        (
            [filename] => sites/all/modules/mysite/plugins/types/feed.inc
            [basename] => feed.inc
            [name] => feed
        )

    [forum] => stdClass Object
        (
            [filename] => sites/all/modules/mysite/plugins/types/forum.inc
            [basename] => forum.inc
            [name] => forum
        )

    [term] => stdClass Object
        (
            [filename] => sites/all/modules/mysite/plugins/types/term.inc
            [basename] => term.inc
            [name] => term
        )

)

The 0.txt is a null value thrown into that array that should not exist. The question is "How did it get there"?

agentrickard’s picture

Just tested on PHP 5.2.0 and MySQL 4.1.20 without any errors.

leducdubleuet’s picture

Title: MySite Installation error, possibly PHP 5.2 » MySite Installation error, possibly PHP 5.2 - Solved for me!

Same problem here but I am using MySQL 5.0.24a and PHP 5.1.6 on Drupal 5.1.

Although I did not have the first error "failed to open stream", I had the same second error about the "Incorrect table name".

I simply went back in "MySite" config window and saved again all the options on the various tabs. TaDa!

The "My Site" module works like a charm again!

I hope this can help you solve this issue as easily as me.

Eric

agentrickard’s picture

Eric-

So, let me see if I understand.

1) You activated the module.
2) You followed the 'My sitename' link.
3) You got an error.
4) You went back and configured the module at admin/settings/mysite
5) The error went away.

Is that right?

agentrickard’s picture

Title: MySite Installation error, possibly PHP 5.2 - Solved for me! » MySite Installation error, possibly PHP 5.2

Eric, please don't change issue titles.

leducdubleuet’s picture

Yes that is right.

Sorry I did not realise I was changing the title for the whole discussion...

Eric

shuklasp’s picture

I am also experiencing this problem. You can view the error at the following address:

http://www.vshiksha.com/mysite/1

agentrickard’s picture

@shuklasp:

What versions of MySQL, PHP, Drupal, and MySite are you running?

agentrickard’s picture

I have been able to duplicate the SQL error. Investigating now.

agentrickard’s picture

Title: MySite Installation error, possibly PHP 5.2 » SQL error using cache_set

The SQL error was caused by a change in http://api.drupal.org/api/5/function/cache_set that I missed.

I'm going to split this original issue. Since the two problems may not be related.

agentrickard’s picture

Status: Active » Fixed

For the first issue, see http://drupal.org/node/118650

agentrickard’s picture

This has been fixed in HEAD and 5.x.1-dev. I'd like to close more bugs (especially http://drupal.org/node/118650) before adding a point release.

The 5.x.1-dev tarball should be available later 13-FEB.

If you'd like to patch your current 5.x.1.8. Here's the code:

mysite.module line 404:

$data = cache_get('mysite:' . $mysite->uid, 'cache');

mysite.module line 434:

cache_set('mysite:' . $mysite->uid, 'cache', serialize($content), time() + $cache_set);

paulcoghlan’s picture

Here you go, I made the changes at line 1447 as per your early post and here is the array that I see at /admin/settings/mysite.

Array
(
[aggregator] => stdClass Object
(
[filename] => modules/mysite/plugins/types/aggregator.inc
[basename] => aggregator.inc
[name] => aggregator
)

[blog] => stdClass Object
(
[filename] => modules/mysite/plugins/types/blog.inc
[basename] => blog.inc
[name] => blog
)

[book] => stdClass Object
(
[filename] => modules/mysite/plugins/types/book.inc
[basename] => book.inc
[name] => book
)

[feed] => stdClass Object
(
[filename] => modules/mysite/plugins/types/feed.inc
[basename] => feed.inc
[name] => feed
)

[forum] => stdClass Object
(
[filename] => modules/mysite/plugins/types/forum.inc
[basename] => forum.inc
[name] => forum
)

[term] => stdClass Object
(
[filename] => modules/mysite/plugins/types/term.inc
[basename] => term.inc
[name] => term
)

)

Array
(
[aggregator] => stdClass Object
(
[filename] => modules/mysite/plugins/types/aggregator.inc
[basename] => aggregator.inc
[name] => aggregator
)

)

Array
(
[blog] => stdClass Object
(
[filename] => modules/mysite/plugins/types/blog.inc
[basename] => blog.inc
[name] => blog
)

)

Array
(
[book] => stdClass Object
(
[filename] => modules/mysite/plugins/types/book.inc
[basename] => book.inc
[name] => book
)

)

Array
(
[feed] => stdClass Object
(
[filename] => modules/mysite/plugins/types/feed.inc
[basename] => feed.inc
[name] => feed
)

)

Array
(
[forum] => stdClass Object
(
[filename] => modules/mysite/plugins/types/forum.inc
[basename] => forum.inc
[name] => forum
)

)

Array
(
[term] => stdClass Object
(
[filename] => modules/mysite/plugins/types/term.inc
[basename] => term.inc
[name] => term
)

)

paulcoghlan’s picture

The Mysite module is now fully functioning for me. I used the suggestion from Eric, above. I went to each Mysite config tab in the Administer>Site Configuration>MySite link. For each tab (Display, Icon, Cache, Default Page) I simply clicked on each one and then 'Save Configuration'. That seemed to rid the 0.inc problem. I made the two changes (lines 404 & 434) in the mysite.module and that cleared up the SQL error.

Shout if you need anything else.

Thanks for your help,
Paul

agentrickard’s picture

I'm still confused as to when the original error occured.

1) You put the MySite folder in your modules directory.
2) You went to /admin/build/modules
3) You checked MySite
4) You hit Submit
5) The error returned when the page re-loaded.

Is that right?

paulcoghlan’s picture

Yes, thats right.

I hate to be unclear on things but you also need to know that I originally installed 1.7 and then copied 1.8 over it and ran the update.php script. Sorry for not mentioning this earlier.

The error occurred using 1.7 and the fix is in place now using 1.8.

Paul

agentrickard’s picture

Ok. That makes sense. The 1.7 release had a dumb bug in it.

agentrickard’s picture

Status: Fixed » Closed (fixed)