Hey, I’ve installed alloc on my server, and after a successful installation
and database connection, I all of a sudden get an error 500 when I’m trying to
access the site, in my php log i get the following.: PHP Parse error: syntax
error, unexpected '(', expecting T_VARIABLE or '$' in
C:\alloc\shared\lib\template.inc.php(123) : eval()'d code on line 15
I’m not so familiar with Php so any help will do. Thanks
Hello Hardus.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
this may be a problem that you might be able to bypass, by downloading and
installing the latest version of allocPSA (1.7) due here on SourceForge within
the next day or so. If you could install that, and report back to confirm that
the error is either still present, or resolved, that would be appreciated.
-- Con
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The php error message is saying that the error is occurring in one of the page
templates, but unless you tell me which page/url the error occurs on, I can't
fix it.
Also I haven't run alloc on PHP 5.3.3 before on windows. So it's possible that
something was tightened in that release that causes the code to fail (whereas
is wouldn't fail on previous versions of PHP).
Okay one last thing, the error:
PHP Parse error: syntax error, unexpected '(', expecting T_VARIABLE or '$' in
C:\alloc\shared\lib\template.inc.php(123) : eval()'d code on line 15
Might be occurring on allocPSA 1.6.x but that exact error is not occurring for
1.7.0. I promise. So please install 1.7.0 and copy and paste the exact error
message.
Thanks,
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I’ve copied the new Alloc, obvious now need to install it again, when I access
this: http:// localhost /alloc/alloc.php I get a blank screen. when I try to
install alloc by going to this: http:// localhost /alloc/index.php I get the
an error 500 on the page and in the log I get this : PHP Warning:
require_once(Zend/Search/Lucene.php): failed to open stream: No such file or
directory in C:\alloc\alloc.php on line 36
PHP Fatal error: require_once(): Failed opening required
'Zend/Search/Lucene.php' (include_path='.;C:\php5\pear:C:\alloc\zend') in
C:\alloc\alloc.php on line 36.
We've done quite a number of test installs of allocPSA, but not on the 64bit
version of WinServer2008 to my knowledge, and not using IIS7 and FastCGI. This
may mean that this combination will need some debugging to make it all work.
It may be easier to try and get the WAMP system going on your Win2k8 server,
and check to see if that suffers the same issue.
Have you followed a HOWTO like the following when tryhing to install WAMP on
your server?
something else has come to mind which may be of use.
If you install VirtualBox ( http://virtuablbox.org/
) on your Win2k8 server, you can then download a pre-built LAMP appliance
system, from one of the following community resources:
Once you've got such as virtualised client LAMP-stack operating system, you
can try to install allocPSA under it, and see if you can bypass these errors.
Running allocPSA under a virtualised OS has a number of advantages, such as
ease of backup and migration to alternate servers.
-- Con
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@Conz I've mannage to get Wamp installed, but still got the same error "PHP
Fatal error: require_once(): Failed opening required 'Zend/Search/Lucene.php'
(include_path='.;C:\php5\pear:C:\alloc\zend') in C:\alloc\alloc.php on line
36."
Then i did a virtual machine (XP 32bit) and still the same.
Then i tried to install AllocPsa 1.7 at home (win7 32bit with wamp) and got
the same error.
Then i installed 1.6.1 at home, and it worked, with out giving the first error
"syntax error, unexpected '(', expecting T_VARIABLE or '$' in
C:\alloc\shared\lib\template.inc.php(123) : eval()'d code on line 15"
Then
@Alex
I've tried that on all the instanses (Win2k8 64bit and win7 32bit) and still
nothing, the error stays exactly the same. My bet is it syntex error, but
anyway.
So I'm going to install 1.6.1 on a XP box here at work and see if it works.
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm going to piggyback on this thread as I'm stuck as well with the same
errors. My setup is as follows:
Windows XP SP3
IIS is disabled
Installed Apache 2.2.17
Installed PHP 5.2.14
I have no PHP experience but finally found the config to turn on error
reporting after reviewing the Apache logs to find that an error 500 was being
returned. I followed Alex's code changes in the alloc.php file.
Warning: require_once(\Zend\Search\Lucene.php) : failed to open stream: No
such file or directory in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\alloc\alloc.php on line 37
Fatal error: require_once() : Failed opening required
'\Zend\Search\Lucene.php' (include_path='.;C:\php5\pear:C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\alloc\zend') in C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\alloc\alloc.php on line 37
Any help would be great.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've tried removing the preceding "DIRECTORY_SEPARATOR" and still receive the
error.
Warning: require_once(\Zend\Search\Lucene.php) : failed to open stream: No
such file or directory in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\alloc\alloc.php on line 37
Fatal error: require_once() : Failed opening required 'Zend\Search\Lucene.php'
(include_path='.;C:\php5\pear:C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\alloc\zend') in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\alloc\alloc.php on line 37
Any other suggestions?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's great. Thanks so much for your patience. I'm going to amend the
alloc.php file to automatically detect whether it's on windows or not, to use
a semi-colon or not. And I'll also have to think about how alloc can detect
whether mbstring is enabled.
You may well run into other problems. Feel free to start a new thread for
other issues. It helps the project as a whole to get feedback about the
obstacles that occur on different platforms.
Cheers,
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey, I’ve installed alloc on my server, and after a successful installation
and database connection, I all of a sudden get an error 500 when I’m trying to
access the site, in my php log i get the following.: PHP Parse error: syntax
error, unexpected '(', expecting T_VARIABLE or '$' in
C:\alloc\shared\lib\template.inc.php(123) : eval()'d code on line 15
I’m not so familiar with Php so any help will do. Thanks
Hello Hardus.
Hi Hardus,
can you confirm which version of PHP you're using?
-- Con
Hey, I'm using 5.3.0
Hardus,
this may be a problem that you might be able to bypass, by downloading and
installing the latest version of allocPSA (1.7) due here on SourceForge within
the next day or so. If you could install that, and report back to confirm that
the error is either still present, or resolved, that would be appreciated.
-- Con
Hardus,
the latest version of allocPSA (1.7) is now up on SourceForge.net. You can
download it from here:
https://sourceforge.net/projects/allocpsa/
To find out what's new in this version, read the following:
http://www.allocpsa.org/index.php?option=com_content&task=view&id=27&Itemid=2
Can you then let us know if you're still experiencing this issue?
-- Con
Hey, I’ve replaced the alloc, but now I’m still getting the same error just
trying to re-install alloc.
At first I thought it was my apache server, but it seems to work fine when I
access this:
http://mail.ils.co.za/alloc/test.php.
So yeah, I don’t know, any help is greatly appreciated
Hardus
Hi Hardus,
we'll can you provide specific details about what the exact error is now, and
in which file it's occurring?
-- Con
Hi Hardus, I'm not sure what the problem is.
The php error message is saying that the error is occurring in one of the page
templates, but unless you tell me which page/url the error occurs on, I can't
fix it.
Also I haven't run alloc on PHP 5.3.3 before on windows. So it's possible that
something was tightened in that release that causes the code to fail (whereas
is wouldn't fail on previous versions of PHP).
Okay one last thing, the error:
PHP Parse error: syntax error, unexpected '(', expecting T_VARIABLE or '$' in
C:\alloc\shared\lib\template.inc.php(123) : eval()'d code on line 15
Might be occurring on allocPSA 1.6.x but that exact error is not occurring for
1.7.0. I promise. So please install 1.7.0 and copy and paste the exact error
message.
Thanks,
Alex
Hey
I’ve copied the new Alloc, obvious now need to install it again, when I access
this: http:// localhost /alloc/alloc.php I get a blank screen. when I try to
install alloc by going to this: http:// localhost /alloc/index.php I get the
an error 500 on the page and in the log I get this : PHP Warning:
require_once(Zend/Search/Lucene.php): failed to open stream: No such file or
directory in C:\alloc\alloc.php on line 36
PHP Fatal error: require_once(): Failed opening required
'Zend/Search/Lucene.php' (include_path='.;C:\php5\pear:C:\alloc\zend') in
C:\alloc\alloc.php on line 36.
Maybe someone can see if I got a setting error by checking this out:
http://localhost/alloc/test.php.
(ps. replace localhost with mail.ils.co.za)
I’m running on WinServer2008 64bit , with IIS7 and using FastCGI to host PHP.
I have tried to install WAMP, but to no avail.
Thanks a lot for all the help so far.
Hardus
Hi Hardus,
this does indeed sound like a frustrating glitch.
We've done quite a number of test installs of allocPSA, but not on the 64bit
version of WinServer2008 to my knowledge, and not using IIS7 and FastCGI. This
may mean that this combination will need some debugging to make it all work.
It may be easier to try and get the WAMP system going on your Win2k8 server,
and check to see if that suffers the same issue.
Have you followed a HOWTO like the following when tryhing to install WAMP on
your server?
http://teamtutorials.com/web-development-tutorials/setting-up-a-wamp-
server
-- Con
Hardus,
something else has come to mind which may be of use.
If you install VirtualBox ( http://virtuablbox.org/
) on your Win2k8 server, you can then download a pre-built LAMP appliance
system, from one of the following community resources:
http://www.turnkeylinux.org/
http://virtualboximages.com/
Once you've got such as virtualised client LAMP-stack operating system, you
can try to install allocPSA under it, and see if you can bypass these errors.
Running allocPSA under a virtualised OS has a number of advantages, such as
ease of backup and migration to alternate servers.
-- Con
Hi Hardus,
Try this:
On line 36 of alloc.php the code reads:
require_once("Zend/Search/Lucene.php");
Change it to:
require_once("Zend\Search\Lucene.php");
(that is, the forward-slashes get changed to double-back-slashes)
or if that doesn't work, change it to:
require_once("Zend".DIRECTORY_SEPARATOR."Search".DIRECTORY_SEPARATOR."Lucene.p
hp");
That will get you past the first error. If you get further errors, paste them
here too.
(you may get other windows platform problems).
Cheers,
Alex
Hey all
@Conz I've mannage to get Wamp installed, but still got the same error "PHP
Fatal error: require_once(): Failed opening required 'Zend/Search/Lucene.php'
(include_path='.;C:\php5\pear:C:\alloc\zend') in C:\alloc\alloc.php on line
36."
Then i did a virtual machine (XP 32bit) and still the same.
Then i tried to install AllocPsa 1.7 at home (win7 32bit with wamp) and got
the same error.
Then i installed 1.6.1 at home, and it worked, with out giving the first error
"syntax error, unexpected '(', expecting T_VARIABLE or '$' in
C:\alloc\shared\lib\template.inc.php(123) : eval()'d code on line 15"
Then
@Alex
I've tried that on all the instanses (Win2k8 64bit and win7 32bit) and still
nothing, the error stays exactly the same. My bet is it syntex error, but
anyway.
So I'm going to install 1.6.1 on a XP box here at work and see if it works.
Regards
Hardus,
good to hear that you've got at least one instance working.
It's strange that it doesn't work on some instances of XP but works on others.
We'll need to monitor this if others have the same problem.
-- Con
Hardus,
can you confirm that you've had success in getting allocPSA to work for you?
-- Con
Con,
I'm going to piggyback on this thread as I'm stuck as well with the same
errors. My setup is as follows:
Windows XP SP3
IIS is disabled
Installed Apache 2.2.17
Installed PHP 5.2.14
I have no PHP experience but finally found the config to turn on error
reporting after reviewing the Apache logs to find that an error 500 was being
returned. I followed Alex's code changes in the alloc.php file.
Here is that coding change I made:
// Set the charset for Zend Lucene search indexer http://framework.zend.com/m
anual/en/zend.search.lucene.charset.html
// require_once("\Zend\Search\Lucene.php");
require_once(DIRECTORY_SEPARATOR."Zend".DIRECTORY_SEPARATOR."Search".DIRECTORY
_SEPARATOR."Lucene.php");
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new
Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8Num_CaseInsensitive());
Below is the error I'm receiving:
Warning: require_once(\Zend\Search\Lucene.php) : failed to open stream: No
such file or directory in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\alloc\alloc.php on line 37
Fatal error: require_once() : Failed opening required
'\Zend\Search\Lucene.php' (include_path='.;C:\php5\pear:C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\alloc\zend') in C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\alloc\alloc.php on line 37
Any help would be great.
Hey Con
I've manage to get mine working by doing the following:
Copy Alloc 1.6.1 on machine (xp SP3, no IIS, WAMP Server 2)
Then all you need to do is turn "rewrite_module" off under your Apache server
settings.
and she works...
I realize this is not 1.7, but I do believe there is a syntax error in there
somewhere and also think Alex is very close to it.
Regards
Hardus
Hardus,
You turned rewrite_module off and then the error went away ... you have a
rewrite rule somewhere that is causing the problem.
Check your apache config, and check any .htaccess files.
There is an additional issue that you've highlighted regarding the include
path with 1.7.0. I notice that you didn't exactly copy my example:
I wrote:
require_once("Zend".DIRECTORY_SEPARATOR."Search".DIRECTORY_SEPARATOR."Lucene.p
hp");
You wrote:
require_once(DIRECTORY_SEPARATOR."Zend".DIRECTORY_SEPARATOR."Search".DIRECTORY
_SEPARATOR."Lucene.php");
Having a directory separator at the start of the path is not what you want.
Cheers,
Alex
Alex,
I've tried removing the preceding "DIRECTORY_SEPARATOR" and still receive the
error.
Warning: require_once(\Zend\Search\Lucene.php) : failed to open stream: No
such file or directory in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\alloc\alloc.php on line 37
Fatal error: require_once() : Failed opening required 'Zend\Search\Lucene.php'
(include_path='.;C:\php5\pear:C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\alloc\zend') in C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\alloc\alloc.php on line 37
Any other suggestions?
In alloc.php line 28 looks like this:
ini_set('include_path',ini_get('include_path').":".dirname(FILE).DIRECTORY
_SEPARATOR."zend");
Note the colon in the middle. Try changing it to a semi-colon. Apparently
windows expects it to be a semi-colon.
Alex
Replaced colon with semi-colon. Now the I receive the following error:
Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message
'Utf8 compatible lower case filter needs mbstring extension to be enabled.' in
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\alloc\zend\Zend\S
earch\Lucene\Analysis\TokenFilter\LowerCaseUtf8.php:48 Stack trace: #0
C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\alloc\zend\Zend\S
earch\Lucene\Analysis\Analyzer\Common\Utf8Num\CaseInsensitive.php(46):
Zend_Search_Lucene_Analysis_TokenFilter_LowerCaseUtf8->__construct() #1
C:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\alloc\alloc.php(39): Zend_Search_Lucene_Analysis_A
nalyzer_Common_Utf8Num_CaseInsensitive->__construct() #2 C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs\alloc\index.php(23):
require_once('C:\Program File...') #3 {main} thrown in C:\Program Files\Apache
Software Foundation\Apache2.2\htdocs\alloc\zend\Zend\Search\Lucene\Analysis\To
kenFilter\LowerCaseUtf8.php on line 48
Okay so the error message says you need the mbstring extension to be enabled.
Google says you need to enable it when you're installing PHP...
http://forums.devshed.com/php-development-5/how-to-enable-mbstring-php-
extension-246123.html
Alex
Needed to include that extension. I now have the installer page! Will try to
install/configure tomorrow. Thanks for help!
Lessons learned:
1) For windows installation change the colon to semi colon on line 28 of the
alloc.php file.
2) Ensure your PHP version has mbstring extension installed during PHP
installation.
That's great. Thanks so much for your patience. I'm going to amend the
alloc.php file to automatically detect whether it's on windows or not, to use
a semi-colon or not. And I'll also have to think about how alloc can detect
whether mbstring is enabled.
You may well run into other problems. Feel free to start a new thread for
other issues. It helps the project as a whole to get feedback about the
obstacles that occur on different platforms.
Cheers,
Alex