I get the following error message when I try to install the module:

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in D:\xampp\OST53\modules\bible\bible.module on line 289

Any suggestions?

CommentFileSizeAuthor
#22 php.zip15.15 KBstrayhand

Comments

MikeLee_Birdy’s picture

Sorry for an old and small bug. This bug is already fixed in the new version.

MikeLee_Birdy’s picture

Status: Active » Fixed
incom’s picture

Version: 5.x-1.2 » 5.x-2.0-dev
Status: Fixed » Active

the error still exists - i am using php 4x and i think ()-> is the problem at line 289

MikeLee_Birdy’s picture

line 289: set_time_limit(240);

This line is used to extend file importing. Otherwise system will alert time exceed. So, you can remark this line if your network speed and cpu/hd is good enought...:)

If your line 289 is not this statement, please let me know with line are you in.

incom’s picture

set_time_limit(240); is on line 253 but

$bid = db_fetch_object($result)->bid; on line 289 is giving the error. I think that “chaining” syntax is PHP5 only.

MikeLee_Birdy’s picture

Could you help me to modify your bible.module on line 288-289 to following statements?

$bidobj = db_fetch_object(db_query("SELECT bid FROM {bible_list} WHERE bsn='%s'", $data[0]));
$bid = $bidobj->bid;

If this change can solve this problem, then there's 3 parts to modify....

incom’s picture

Solved the error. Please update the next 3 parts to modify...

MikeLee_Birdy’s picture

The rest 2 parts are:
Line 374-375:

$snobj = db_fetch_object(db_query("SELECT snid FROM {bible_sn_list} WHERE snname='%s' AND lang='%s'", $data[0], $data[1]));
$snid = $snobj->snid;

Line 546-547:

$snobj = db_fetch_object(db_query("SELECT snid FROM {bible_sn_list} LIMIT 1"));
$snid = $snobj->snid;

Sorry...I'd to use my line number. Do you update to last version(5.x-2.0-dev)?
I'll put this modified version on next update. Thanks.

incom’s picture

Thanks i made all changes and it is working. But please note that the module which is available for download is not the bible.module,v 1.4.2.4 2008/01/13 15:15:35 - please update the latest.

How do i enable the link to bible for site visitor. Now the menu works for users.

incom’s picture

Please ignore the menu issue which is resolved by database updation

geomarketing’s picture

I still get the "Parse error: parse error, unexpected T_OBJECT_OPERATOR" with the 5.2 version on my hosted account (Linux), but not on my Windows dev box. There I have the import problem.

Should I try the above fixes?

MikeLee_Birdy’s picture

The bug here is owing to php version. Please check your php version first.

geomarketing’s picture

Thanks - my error - as I checked with the hosting company and I was at PHP 4.X - once I upgraded everything went without a problem.

I will spend some time with you stuff and see if I can port my .NET Ajax enabled poor mans "interlinear' with Strongs over to this environment. I displayed both the KJV and the corresponding Greek verse both with the Strongs numbering also including the Strongs definition. All that is in the public domain and available. I also had a linked notes section for each verse indexed to the Bible record identifier.

I think using the taxonomy ( for word studies, etc. ) and the ability for additional notes the user can attach to a node (which could be an individual verse) could provide a very powerful study tool that could also be shared across users to do "on line" study groups. At least this is where my site is headed.

Bless your heart for doing this work!

ewoodfin’s picture

Hi MikeLee,
I am getting the same error as above. I was able to locate lines to replace lines 288-289 as you specified above. Unfortunately I don't have line numbers in the window this code opens in, so I'm not exactly sure which lines to replace with your last 2 mods. Would it be possible to post the lines to replace so I can do a find to locate them? Even better, is there a version available for download that already has these fixes in place?

I really appreciate your efforts in developing this module. I'm new to Drupal and I really appreciate the help. God Bless.

MikeLee_Birdy’s picture

Dear ewoodfin:
Sorry...I've lost my last version. My suggest is to search 'db_query("SELECT' lines, and you'll find corresponding position.
And....I've release next RC version. I suggest you can get the lastest version.
MikeLee

ewoodfin’s picture

Hi MikeLee,
Thanks for the reply. I have tried this 2.0 version as well as this one: 5.x-1.3-rc1 2008-Jan-06 13.02 KB, and I still get the error. What is the latest release with the fix and where can I find it?

I now have an editor that shows line numbers, but the line numbers don't match the ones you reference, so I haven't been able to change the code myself.

Thanks again for the good work you're doing.
--Eric

MikeLee_Birdy’s picture

Dear Eric:
I guess this could be solve in new version. I've put the lastest version on. It's 5.x-1.3-rc2. Please try and let me know if it works.
MikeLee
ps. Could you let me know your php version and OS(Linux or Windows)?

ewoodfin’s picture

Dear MikeLee:
My hosting service shows as running Linux and php 4.4.7.

I'm anxious to try the module, but I'm a little nervous about trying it. Thanks your help with it. BTW - where in the file structure should bible-kjv-eng.bc be placed?

MikeLee_Birdy’s picture

So... It might be the same problem of php4. I've solve this problem in the new version.... or can you point out the error lines?

.bc file is host on http://drupalbible.mikelee.idv.tw/ , you can download there. After download this file, place anywhere to untar. Be sure to import this file from admin/setting/bible/import .

hermit_kid’s picture

how do i view the bible? i've imported ok -- but i can't seem to render any content...is there a setting to activate the books?

MikeLee_Birdy’s picture

Just go to /?q=bible , and you'll see the bible book list.

strayhand’s picture

StatusFileSize
new15.15 KB

I too experienced this error and I thought I would share my process and how I was able to resolve it. As the post above indicate this error seems to be tied to some differences between PHP 4 and PHP 5. I use site5.com for my hosting and by default they support PHP 4.2.x. They also offer PHP 5.2. In order to get Drupal to use PHP 5.2 I had to put a new line in my .htaccess file:

AddHandler application/x-httpd-php5 .php

This seemed to resolve this specific error. I did however run into another error involving PHP. It had to do with the file size parameters. Basically I wasn't able to upload the bible .bc files. I decided to look at my phpinfo() file: /admin/logs/status/php. What I noticed was that my "upload_max_filesize" and "post_max_size" parameters where set too low. The uncompressed .bc files are about 4MB and my settings where less than that. I bumped them both up to 8MB and I was finally able to upload the .bc files. I should note that in order to get my new PHP parameters to stick I had to put a new php.ini file inside the root Drupal directory. This has a lot to do with how site5.com is setup but if you're having difficulty setting your PHP parameters you might try creating a php.ini file at the same level as the script you're trying to run. I'm going to include a sample php.ini file for you to look at in case you have questions.

I have some additional information regarding a MySQL error that I encountered but I'll share that on the actual issue thread.

walidbigboss’s picture

hi every one ,
i have a problem with my wbsite i try to put it in my domain name server and this is the message shown :

Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home.34/w/a/l/walidbig/www/videos/web/youtube.php on line 32

and this is the line 32 :$this->video = $this->dom->getElementsByTagName('entry')->item(0);

i dont know if the servers of websites have no the php 5 version who will bellieave this
so i have this problem i need to put my website online
pleaze help amigos

Kriss-dupe’s picture

Status: Active » Fixed

Been here too long, clearing up for efficiency.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.