Parse error: syntax error, unexpected '{' in /mnt/local/home/tgrove1/lib/drush/includes/environment.inc on line 691

frankcarey - April 17, 2009 - 18:12
Project:Drush
Version:All-Versions-HEAD
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

getting this right after cvs installation of head

#1

frankcarey - April 17, 2009 - 18:17

huh, getting this in in the alpha release as well.

I don't see any '{' on line 691, so wtf? :)

Seems others are using this "module", so must be something special i'm doing or not doing? .... going to read the README one more time

#2

frankcarey - April 17, 2009 - 18:25

hmmm. alpha 1 works fine, but i get the error on alpha2 and head (note: i'm switching btw them with csv up -r ...

#3

frankcarey - April 17, 2009 - 18:33

parts alpha 1 are working fine anyway

here is what i'm getting with alpha 1 now (i know that my drush command may be junk, but I figured i'd report it.

$ drush dl help

Fatal error: Call to undefined function: simplexml_load_file() in /mnt/local/home/tgrove1/lib/drush/includes/core_commands.drush.inc on line 235

#4

kaerast - April 18, 2009 - 13:34

I am seeing this with drush update, but nowhere else. I am running alpha2, and there are currently no updates available to me. I wonder what will happen when there are.

#5

rsvelko - April 20, 2009 - 10:57

use the packaged HEAD.tar.gz - I have no error with mine (attached it - so you can use sth while they resolve this.)

Currently the latest CVS HEAD is under vast development and you may get unlucky quite easy I suppose - devs correct me if I am wrong.

AttachmentSize
drush-HEAD.tar_.gz 62.18 KB

#6

moshe weitzman - April 20, 2009 - 11:58

I can't reproduce this. can someone post a patch?

#7

frankcarey - April 21, 2009 - 05:34

I'm not sure even where to start, the error didn't make sense to me, Ill download this later and retest. Moshe, should i try this or the latest HEAD?

#8

anarcat - April 22, 2009 - 22:14
Status:active» fixed

How about trying again with head and reopening if the bug is still there?

#9

frankcarey - April 23, 2009 - 04:47

i don't get that message any more :) i get this one. Seems like a new issue?

Fatal error: Cannot redeclare simpletest_drush_help() (previously declared in /home/frank/bin/.drush/commands/simpletest/simpletest.drush.inc:11) in /var/www/devroots/d6-matadortravel-com/sites/all/modules/drush_extras/simpletest.drush.inc on line 16

Call Stack:
0.0008 92896 1. {main}() /home/frank/bin/.drush/drush.php:0
0.0127 685284 2. drush_main() /home/frank/bin/.drush/drush.php:26
0.0284 1188256 3. drush_dispatch() /home/frank/bin/.drush/drush.php:65
0.0284 1188256 4. call_user_func_array() /home/frank/bin/.drush/includes/drush.inc:23
0.0284 1188256 5. drush_command() /home/frank/bin/.drush/includes/drush.inc:0
0.0285 1188288 6. call_user_func_array() /home/frank/bin/.drush/includes/command.inc:274
0.0285 1188288 7. drush_invoke() /home/frank/bin/.drush/includes/command.inc:0
0.0290 1188664 8. call_user_func_array() /home/frank/bin/.drush/includes/command.inc:226
0.0291 1188664 9. pm_dl() /home/frank/bin/.drush/includes/command.inc:0
0.0291 1188664 10. drush_bootstrap_max() /home/frank/bin/.drush/commands/pm/pm.drush.inc:633
0.1528 2224992 11. drush_bootstrap() /home/frank/bin/.drush/includes/environment.inc:244
0.1530 2225456 12. _drush_bootstrap_drupal_full() /home/frank/bin/.drush/includes/environment.inc:164
1.5206 25871920 13. _drush_find_commandfiles() /home/frank/bin/.drush/includes/environment.inc:536

#10

frankcarey - April 23, 2009 - 04:49

Ah wait, I get it. I got rid of drush, but not drush_extras. I prob have to delete that too ;)

var/www/devroots/d6-matadortravel-com/sites/all/modules/drush_extras/simpletest.drush.inc

#11

usonian - April 25, 2009 - 19:39

FWIW, this seems to be a PHP 4 problem; my hosting provider uses PHP5 for Apache, but defaults to PHP4 on the command line. When I tried the PHP 5 CLI binary, it worked fine with the Alpha2 version.

#12

ericrdb - May 8, 2009 - 03:28

Agreed, same experience on my host as well. PHP 4 defaulted on command line, and worked fine with running PHP5.
In case it helps, my .bash_profile now includes:
alias drush= '/usr/local/php5/bin/php /home/ericrdb/files/drupal-scripts/drush/drush.php'

#13

rsvelko - May 19, 2009 - 21:53

hey, drush maintainers - what is our position about drush and php5? is php5 a requirement for drush? is this documented and checked by drush itself if so?

#14

moshe weitzman - May 20, 2009 - 01:54

Our position is that we don't care about php4 but if someone else does, please provide a patch. Alternatively, if you want to help and don't care either, provide a patch so that drush complains immediately if you have php < 5.

#15

System Message - June 3, 2009 - 02:00
Status:fixed» closed

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

#16

ceardach - July 10, 2009 - 04:29

For anyone else having problems with a host using php5 for Apache, and php4 on the command line, here's another solution that makes all php calls in the shell default to php5 instead.

echo 'export PATH="$HOME/packages/bin:$PATH"' > .bash_profile
mkdir -p packages/bin
ln -s /usr/local/php5/bin/php packages/bin/php

Basically, just need to softlink the php binary into the first directory that is in your PATH.

 
 

Drupal is a registered trademark of Dries Buytaert.