All the lines containing " &$imageinfo = NULL" create a parse error.
Apparently, it's not legal in php 5.2 to have a default value for a reference, according to this page : http://www.php.net/manual/en/functions.arguments.php#32616

I tried to change the code to have the variable passed by value instead of reference but I run into another issue. Same thing if I remove the default value but keep the variable passed as a reference.
I also checked with the latest dev version and it seems that the error is still present.

Comments

Clamshell’s picture

PHP:4.4.8
Mysql:5.0.45
Drupal:6.4.0
I am recieving the same error After installing signwriter 6.x-2.0-beta1 on my drupal instance; I recieve a blank page when attempting to connect to zagarcontracting.com. I checked the weblogs and found the following error

Parse error: syntax error, unexpected '=', expecting ')' in /sites/all/modules/signwriter/signwriter.module on line 532.

Is there something that you can tell me on how to resolve the error above and why I wouldn't be able to see my drupal instance? Atleast tell me how I can uninstall this instance to recover from this problem. I had read the blank page could possibly be caused from a memory limit problem but I am speculating that it could be related to the parse error with your module.

www.zagarcontracting.com

Please help!
Steve Graham

Agileware’s picture

OK, I'll get onto this problem asap. Patches save time though as always so if anyone has the time to do one, thank you.

@Clamshell:
You can disable the module directly in the database if you can't get to the modules admin page.
Just go to your database and run:

UPDATE system SET status = 0 WHERE name = 'signwriter'
Agileware’s picture

I'm running 5.2.4 and it works fine.

This default values for pass-by-reference parameters problem is only in php version before 5. In 5 it has been added. - http://us.php.net/manual/en/language.references.pass.php#83298

So this is only a pre php5 problem.

Looking into the best solution...

Agileware’s picture

Priority: Critical » Normal
Status: Active » Closed (won't fix)

The bast way to get around this is to upgrade to PHP 5.2, which is recommended for drupal 6 anyway. - http://drupal.org/requirements

It isn't always possibly I understand but time is a limiting factor with this work and time will better spent in other places of signwriter.
I have seen other modules refuse to patch this very same problem for PHP4.

PHP 5.2 has been out since 2006 and it is counter productive to be changing code to make allowances for obsolete technology. Also PHP 4 has not been supported for at least a year now, for security reasons alone if your website is live on the internet you should be asking your host to upgrade.

Changing to normal as it only affects php4.
Marking as won't fix.

For now I have committed a change to the info file that makes php 5 a requirement for signwriter so people don't end up with this problem.
The requirement is also now noted on the signwriter module page.

If a nice solution is found that doesn't negatively affect the module in any way it may be considered, so feel free to reopen this issue if you want to submit a patch.

Agileware’s picture

Clamshell’s picture

Appreciate the solution but unfortunately my hosting service will not allow me to change the php version. I am getting ready to try this again under a test application instance this time. Hopefully I have better results. I will take a look to see if you have any updates to the signwriter module since my original response. I apologize for taking so long to respond.