install w/php5 working after parse error

Get help with installation and running YaBook guestbook here. Please do not post bug reports or feature requests here.

Moderators: Moderator Team, Development Team

install w/php5 working after parse error

Postby angelratdesigns on Fri Dec 16, 2005 12:25 am

i have double and triple checked the info i needed to change. i checked to make sure my server used php5. it does. (5.1) and i just cant get past this message:

Parse error: parse error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /homepages/**/d*********/htdocs/*****/yabook/private/lib/sourdough/Sourdough.class.php on line 40

(this error shows up for some on line 44)

i even downloaded the program again.
Last edited by angelratdesigns on Mon Dec 19, 2005 2:57 pm, edited 3 times in total.
angelratdesigns
 
Posts: 6
Joined: Fri Dec 16, 2005 12:03 am

Postby angelratdesigns on Sun Dec 18, 2005 7:39 am

for the mod who insists that this is because i am not running php5 on my server, (i used the search function and saw how frustrated you were getting with those who "don't have php5") i ran a php info check and it came back with... PHP5. just like i knew it would.

something is wrong with the sourdough program because enough people are getting the same error (within a few lines of eachother). as soon as the constant list starts, bam! the program tells us something is wrong. since i don't know much about php, i have been looking for some way to fix it or someone to help me understand why it isn't working on a system that should work.

my web server (btw) is 1and1.com (the linux server)
angelratdesigns
 
Posts: 6
Joined: Fri Dec 16, 2005 12:03 am

Postby angelratdesigns on Sun Dec 18, 2005 8:50 am

ok, i finally figured out the problem.

many servers are running multiple versions of php.

to differentiate between them some servers require that .php5 is used in place of .php

that means changing file endings and references within the files themselves

after fixings several missed references, i finally see what the programmers intended us to see. a guestbook.

if anyone wishes to share my good horse sense, and sheer dumb luck, i will have the altered files available for download on my site.

http://angelratdesigns.com

look for the word yabook, and click on that for the download.

oh, and one more thing, to edit any of the php files like you will need to, you need to change the file ending to .php to open it, and when you are done, change it back to .php5
angelratdesigns
 
Posts: 6
Joined: Fri Dec 16, 2005 12:03 am

Postby angelratdesigns on Mon Dec 19, 2005 4:41 am

ok, one oops i cannot seem to solve.

when i hit the save/submit/cancel buttons, the form tries to return to index.php instead of index.php5

if anyone can help me figure out where to go to fix this, i would be most greatful.
angelratdesigns
 
Posts: 6
Joined: Fri Dec 16, 2005 12:03 am

Postby sdjl on Mon Dec 19, 2005 1:16 pm

I'm going to assume you've changed this line (line 27) in index.php?
[php]
define('YABO_PHPEXT', 'php'); // Change this if your PHP extension is not *.php!
[/php]
If not, that could well be your problem :)

David
User avatar
sdjl
Moderator
 
Posts: 1282
Joined: Mon Nov 17, 2003 1:13 am
Location: London, UK

Postby angelratdesigns on Mon Dec 19, 2005 1:25 pm

oh i have definitely changed that. if you want to see my work, the program is available for download from my site. i have gone thru and double, triple checked, but the submit button wants to take me back to php instead of the defined php5. also the cancel button. and it is like this for the signin book, and the admin section.

everything else works great. or at least it looks good since it is empty.

http://angelratdesigns.com/yabook/index.php5
angelratdesigns
 
Posts: 6
Joined: Fri Dec 16, 2005 12:03 am

Postby angelratdesigns on Mon Dec 19, 2005 2:56 pm

holy moly.

i... um... i think i got it to work. i quadruple checked everything, and whether it triggered something, or i just hit on something while doing all this, i actually got it to work.

yay me.

now, time for an hour of sleep before i go to work. heh
angelratdesigns
 
Posts: 6
Joined: Fri Dec 16, 2005 12:03 am

Postby sdjl on Mon Dec 19, 2005 6:17 pm

Glad you got it all sorted :)

David
User avatar
sdjl
Moderator
 
Posts: 1282
Joined: Mon Nov 17, 2003 1:13 am
Location: London, UK

Better filename extension renaming in YaBook 0.98-alpha

Postby pipo on Mon Jan 02, 2006 5:01 pm

right, renaming filename extensions was quite a mess and didn't work as expected. I have fixed that in CVS and wrote a small FAQ about it:

How do I use a file extension different to .php (e.g. .php5) ?

If you're not able to get the most current CVS-checkout, grab a daily snapshot from:

http://www.phpee.com/Home/Downloads

take care
philip
Philip Iezzi - Development Team Leader, phpee.com
PHPee.com | Downloads | PPhlogger
hosted by Onlime Webhosting
User avatar
pipo
Site Admin
 
Posts: 773
Joined: Sat Nov 15, 2003 2:57 pm
Location: Zurich, Switzerland

Postby melztrom on Thu Jan 26, 2006 6:16 pm

Hello there,


Good for mister angeldesigner that the problem is fixed, bummer for me that it's not clear how... :D

When I tried to upgrade I encountered the same error:
Code: Select all
Parse error: parse error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /home/melze.nl/www/gb/private/lib/sourdough/Sourdough.class.php on line 52


- I did not change anything in the file mentioned
- I did not mod any other files then config.inc

Can someone please help me on this?

Cheers!
Melle.
-- destroy, erase, reboot
User avatar
melztrom
 
Posts: 1
Joined: Thu Jan 26, 2006 6:11 pm
Location: Amsterdam / NL


Return to YaBook Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron