Share » Forums » Setup & design » problem trying to run...

problem trying to run ezpgenerateautoloads.php

problem trying to run ezpgenerateautoloads.php

Saturday 19 February 2011 8:01:22 am - 17 replies

Author Message

Steven E. Bailey

Saturday 19 February 2011 9:21:37 am

You don't have to run ezpgenerateautoloads.php as root. Depending on what the permissions of the generated files are, you may have to run it as whatever user owns it. If the permissions are o.k. but you aren't the owner then you'll get a chmod error but you can safely ignore that one.

As far as any other insight... no idea... what version of eZPublish are you running? That would maybe help.... The versions I have on my laptop ez420 to ez440 have:

$params->registerOption( $helpOption );

or

$targetOption = new ezcConsoleOption( 't', 'target', ezcConsoleInput::TYPE_STRING );

for line 70... Is one of those your line 70?

I assume this is a site that has been running with no problems? I assume your ezpgenerateautoloads.php hasn't been modified? Are you running ezc as a lib folder or as the pear library?

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Andy Woods

Saturday 19 February 2011 11:39:12 am

I'm running the latest version of ezpublish v4.4
Line 70 of my ezpgenerateautoloads.php is:
$targetOption = new ezcConsoleOption( 't', 'target', ezcConsoleInput::TYPE_STRING );
ezc was part of the tar file I unpacked when installing ezpublish. I haven't installed it using PEAR.

Steven E. Bailey

Saturday 19 February 2011 12:51:53 pm

The md5sum of the bin/php/ezpgenerateautoloads.php should be 7d7f065a0d68dea2eb4acf7af6672f19

Can you double-check that?

Also, are you defining EZP_USE_BUNDLED_COMPONENTS in config.php? If you are, is it correct?

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Andy Woods

Sunday 20 February 2011 3:44:28 am

Yes - I am defining EZP_USE_BUNDLED_COMPONENTS as TRUE in config.php

How do I determine what the md5sum is?

Steven E. Bailey

Sunday 20 February 2011 7:07:13 am

Telnet to the command line again and run the md5sum <file> command on the ezpgenerateautoloads.php file. Alternatively, go to the backend and look at the setup/systemupgrade page and see if the ezpgenerateautoloads.php file is listed as a modified file.

I was able to mimic your error message by changing line 70 to:

$targetOption = new ezcConsoleOption) 't', 'target', ezcConsoleInput::TYPE_STRING );

Which is the problem that the md5sum would find out. But you've looked at the file and that line is correct? If the problem where on another line then the error message would display another line.

Alternatively you could comment out those 4 lines that have targetOption since you aren't using that option anyway... but that may only move the error down to the next option.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Andy Woods

Sunday 20 February 2011 9:27:35 am

I ran the md5sum command and I get the same value as you quoted above: 7d7f065a0d68dea2eb4acf7af6672f19

I commented out lines 70,71,72,73 but when I ran the script again it gave the same error message but this time for line 75.

Have you heard of anyone else seeing this?

I do appreciate your help - Thank you.

Andy

Steven E. Bailey

Sunday 20 February 2011 12:36:20 pm

No, I've never seen this and haven't heard anyone else having this problem. But, then I almost always use the pear library for the ezcomponents. I did once end up having weird problems when I copied the pear directories to to the ezpublish lib thinking they were the same (they're not)... but, you weren't doing anything weird like that.

I'm pretty much at a loss to figure out what could be causing this at this point.

What version of php are you running and under what OS?

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Andy Woods

Monday 21 February 2011 1:22:34 am

I'm running Apache/2 on Linux with PHP Version 5.2.17

Andy

Marko Žmak

Monday 21 February 2011 5:13:42 am

Hm, maybe pasting here the code around the line 70 of your ezpgenerateautoloads.php could help?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Andy Woods

Monday 21 February 2011 6:30:19 am

Hi Marko,

Here is the code:

$targetOption = new ezcConsoleOption( 't', 'target', ezcConsoleInput::TYPE_STRING );
$targetOption->mandatory = false;
$targetOption->shorthelp = "The directory to where the generated autoload file should be written.";
$params->registerOption( $targetOption );

Andy Woods

Monday 21 February 2011 11:30:19 am

Hi Marko,

I just noticed the 'Regenerate autoload arrays for extensions' within the 'Extensions' page in Setup.

I clicked on it and voila - it worked!

I am now able to configure the 'ezSurvey' extension.

Andy

Andy Woods

Monday 21 February 2011 1:42:20 pm

It looks like not everything is sorted...

I can now add a survey to my web site and it works from the front-end but if I include a 'Receiver' attribute I see the following error message when I submit the form:

Fatal error: eZ Publish did not finish its request

The execution of eZ Publish was abruptly ended. Contact website owner with current url and what you did, and owner will be able to debug the issue further.

Can you shed any light as to why this happens please?

Thanks,

Andy

Marko Žmak

Monday 21 February 2011 11:58:19 pm

Hi Marko,

Here is the code:

$targetOption = new ezcConsoleOption( 't', 'target', ezcConsoleInput::TYPE_STRING );
$targetOption->mandatory = false;
$targetOption->shorthelp = "The directory to where the generated autoload file should be written.";
$params->registerOption( $targetOption );

Could you point out which is the line 70?

It seems like something odd is happening on your server/eZP installation, and I believe that this problem with the autoloads generation should be solved first.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Andy Woods

Tuesday 22 February 2011 12:29:52 am

LIne 70 is: $targetOption = new ezcConsoleOption( 't', 'target', ezcConsoleInput::TYPE_STRING );

Mark Yasuda

Wednesday 01 June 2011 8:15:02 am

LIne 70 is: $targetOption = new ezcConsoleOption( 't', 'target', ezcConsoleInput::TYPE_STRING );

Hi Andy,

Did you ever manage to get this sorted? I'm having the same parse errors as you are... Same line of text, except my error occurs on line 55 (guessing it's an older version of eZ)

Thanks,

Mark

Andy Woods

Tuesday 07 June 2011 3:47:13 am

Hi Mark,

The way I overcame the parse errors was to click on the 'Regenerate autoload arrays for extensions' within the 'Extensions' page in Setup instead of running it from the command line.

Andy

Mark Yasuda

Tuesday 07 June 2011 4:15:30 am

Thanks Andy,

That button in the admin panel never works for us! :(

In case anyone is interested, the reason it wasn't running was due to running multiple versions of PHP on that server.
Apache using 5.1.6, and the default cli being 4.4.7

Therefore, attempting to access a constant of an uninstanced class (ezcConsoleInput::TYPE_STRING), failed miserably on 4.4.7 as I believe it was unsupported in this version.
(see: http://www.php.net/manual/en/keyword.paamayim-nekudotayim.php#24181)

Anyway, a schoolboy error not checking the version of cli php it was running under, and solved by directly running 5.1.6 php at the shell...

$ /usr/bin/php bin/php/ezpautogen..... etc.

Thanks,
Mark

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu