Error when trieing to build PHP for litespeed

#1
Hello
i just setup a directadmin server
i tried to setup litespeed
from litespeed plugin and i installed litespeed
but when i tried to build matching PHP
with
/usr/local/directadmin/plugins/litespeed/admin/build_lsphp

i get this error
/usr/local/directadmin/plugins/litespeed/admin/build.func: line 13166: syntax error: unexpected end of file
custombuild 2.x scripts
fail to detect php version, exit

the mentioned line is the end of the file
i compared it with another server that i installed directadmin month ago

on old file
this is the end
}

####################################################


if [ $# -eq 2 ]; then
USER_INPUT=0
INPUT_VALUE=$2
fi

writeLog $@


and in the new server file

if [ $# -eq 2 ]; then
USER_INPUT=0
INPUT_VALUE=$2
fi

if [ "$1" != "gen_help_json" ] && [ "$1" != "opt_help" ] && [ "$1" != "set" ] && [ "$1" != "get_versions_txt" ] && [ "$1" != "" ] && [ "$1" != "versions_json" ] && [ "$1" != "gen_help" ] && [ "$1" != "version" ] && [ "$1" != "versions" ] && [ "$1" != "versions_nobold" ] && [ "$1" != "list_configs_json" ] && [ "$1" != "settings_json" ]; then
writeLog $@


what could cause this problem

here is my ./build options

Apache: 2.4.7
mod_ruid2: no
htscanner: 1.0.1
Dovecot: 2.2.12
AWstats: no
Exim: 4.82
exim.conf update: no
SpamAssassin: no
ClamAV: no
MySQL: no
MySQL backup: yes
MySQL backup directory: /usr/local/directadmin/custombuild/mysql_backups
PHP (default): 5.4 as fastcgi
phpMyAdmin: 4.1.13-all-languages
ProFTPD: 1.3.4d
Pure-FTPd: no
RoundCube webmail: 0.9.5
Replace "php.ini" with './build all' and './build php_ini': yes
Replace "php.ini" using type: production
Cron for notifications and (or) updates: yes
Cron frequency: weekly
Auto notifications: yes
Auto notifications email address:
Auto updates: yes
Run "clean" every time: yes
Run "clean_old_webapps" every time: yes
Run "clean_old_tarballs" every time: yes
Show texts in bold: yes
SquirrelMail: 1.4.22-20140402_0200
Zend Guard Loader:
ionCube loader: 4.6.1
Suhosin: no




and here is my versions

Latest version of DirectAdmin: 1.45.0
Installed version of DirectAdmin: 1.45.0

Latest version of Apache: 2.4.7
Installed version of Apache: 2.4.7

Latest version of ProFTPD: 1.3.4d
Installed version of ProFTPD: 1.3.4d

Latest version of libpng: 1.2.51
Installed version of libpng: 1.2.51

Latest version of ICU4C: 4.8.1.1
Installed version of ICU4C: 4.8.1.1

Latest version of libxslt: 1.1.28
Installed version of libxslt: 1.1.28

Latest version of libxml2: 2.9.1
Installed version of libxml2: 2.9.1

Latest version of iconv: 1.14
Installed version of iconv: 1.14

Latest version of PCRE: 8.20
Installed version of PCRE: 8.20

Latest version of FreeType: 2.5.3
Installed version of FreeType: 2.5.3

Latest version of dovecot: 2.2.12
Installed version of dovecot: 2.2.12

Latest version of Exim: 4.82
Installed version of Exim: 4.82

Latest version of PHP 5.4: 5.4.27
Installed version of PHP 5.4: 5.4.27

Latest version of RoundCube webmail: 0.9.5
Installed version of RoundCube webmail: 0.9.5

Latest version of phpMyAdmin: 4.1.13-all-languages
Installed version of phpMyAdmin: 4.1.13-all-languages

Latest version of SquirrelMail: 1.4.22-20140402_0200
Installed version of SquirrelMail: 1.4.22-20140402_0200



all i want is just to build lite speed matching PHP
 

Lauren

LiteSpeed Staff
Staff member
#2
Looks like the new DA scripts changed a little. So for a quick fix, you can modify build_lsphp script directly:
1. comment out line 198 for build_lsphp:
# create_lsbuild;​
2. add line "fi" at the end of build_func, so it will look at this:
writeLog $@
fi​
3. run build_lsphp again

We will look into it to resolve this issue.
Thanks,
Lauren
 
#3
Hello
this not solve issue
i also tried smtalk solution after this and that did not work too
http://forum.directadmin.com/showthread.php?t=48830

end of the file now is

if [ $# -eq 2 ]; then
USER_INPUT=0
INPUT_VALUE=$2
fi

if [ "$1" != "gen_help_json" ] && [ "$1" != "opt_help" ] && [ "$1" != "set" ] && [ "$1" != "get_versions_txt" ] && [ "$1" != "" ] && [ "$1" != "versions_json" ] && [ "$1" != "gen_help" ] && [ "$1" != "version" ] && [ "$1" != "versions" ] && [ "$1" != "versions_nobold" ] && [ "$1" != "list_configs_json" ] && [ "$1" != "settings_json" ]; then
writeLog $@
fi

create_lsbuild; commented out ( it was comcented out by default
create_lsbuild;

it seems every time i run build_lsws the final fi is get removed from end of the build.func automatically
 

Lauren

LiteSpeed Staff
Staff member
#4
I think the smtalk solution works.
if you follow my previous steps, I think you did not do step 1, either commented out or just delete that line for now. if you run create_lsbuild, it will regenerate build_func file.
 
#6
hello
is there any body who could help !?
its your problem and im unable to use this webbserver on this server
im going to contact for canceling license until issue solve
 
#7
hello
is there any support ?
this islitespeed bug not my problem and i need fast action and reponse !
its more than 7 day and i paid for this license without any usage !
are you going to add extra time to my license for you problem ?!
 
#9
Hello !
any body here???
when you talking about support just trough forum in order pages people think that you will answer right away !
but know i see that you dont even answer after weeks !
if you cant solve this issue because of "" i dont have time for this"" matter or because of technical difficulties
please just tell me to give you my ip address so you tell buycpanel.com to refund me for this useless license
 

Lauren

LiteSpeed Staff
Staff member
#10
If you PM me your temp server login, I can login to your server to take a look. We do not have exact environment, so cannot reproduce your bug.
 
#11
Hello and thanks
you solved my problem after i sent you server access and i sucessfully copiled php

but i have some problems

PHP is v 5.4.28
my compile options are
'--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-litespeed' '--with-config-file-scan-dir=/usr/local/lib/php.conf.d' '--with-curl=/usr/local/lib' '--enable-gd-native-ttf' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-freetype-dir=/usr/local/lib' '--with-libxml-dir=/usr/local/lib' '--with-kerberos' '--with-openssl' '--with-mcrypt' '--with-mhash' '--with-mysql=mysqlnd' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=mysqlnd' '--with-pcre-regex=/usr/local' '--with-pdo-mysql=mysqlnd' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-xsl' '--with-zlib-dir=/usr/local/lib' '--enable-zip' '--with-iconv=/usr/local' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-soap' '--with-icu-dir=/usr/local/icu' '--enable-intl'

and with
APC
eaceclator
memcache
and i dont see ioncube here !

1- i cant compile eaccelerator i get following errors

creating libtool
appending configuration tag "CXX" to libtool
configure: creating ./config.status
config.status: creating config.h
Compiling eAccelerator extension
/bin/sh /usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/libtool --mode=compile cc -I. -I/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1 -DPHP_ATOM_INC -I/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/include -I/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/main -I/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1 -I/usr/local/lsws/lsphp5/include/php -I/usr/local/lsws/lsphp5/include/php/main -I/usr/local/lsws/lsphp5/include/php/TSRM -I/usr/local/lsws/lsphp5/include/php/Zend -I/usr/local/lsws/lsphp5/include/php/ext -I/usr/local/lsws/lsphp5/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/eaccelerator.c -o eaccelerator.lo
mkdir .libs
cc -I. -I/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1 -DPHP_ATOM_INC -I/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/include -I/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/main -I/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1 -I/usr/local/lsws/lsphp5/include/php -I/usr/local/lsws/lsphp5/include/php/main -I/usr/local/lsws/lsphp5/include/php/TSRM -I/usr/local/lsws/lsphp5/include/php/Zend -I/usr/local/lsws/lsphp5/include/php/ext -I/usr/local/lsws/lsphp5/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/eaccelerator.c -fPIC -DPIC -o .libs/eaccelerator.o
/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/eaccelerator.c: In function ‘eaccelerator_restore’:
/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/eaccelerator.c:878: warning: assignment discards qualifiers from pointer target type
/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/eaccelerator.c: In function ‘eaccelerator_compile_file’:
/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/eaccelerator.c:1317: error: ‘zend_class_entry’ has no member named ‘line_start’
/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/eaccelerator.c: At top level:
/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/eaccelerator.c:1913: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘eaccelerator_functions’
/usr/local/lsws/phpbuild/php-5.4.28/eaccelerator-0.9.6.1/eaccelerator.c:1938: error: ‘eaccelerator_functions’ undeclared here (not in a function)
make: *** [eaccelerator.lo] Error 1
**ERROR** Could not compile eAccelerator extension


i have an error in admin panel
2014-05-08 15:32:46.554WARN/etc/httpd/conf/extra/httpd-hostname.conf:9: Directive 'suPHP_UserGroup' is not allowed in current context.

and also when i compile php it dose not create php.ini file and i dont knwo which file i must use and where to put that file
 

mistwang

LiteSpeed Staff
#12
You only need one opcode cache, do not try to use APC and eAccelerator at the same time. APC might be more stable. For PHP 5.5 you may need to use Zend opcache. eAccelerator may not be compatible with PHP 5.4 .

ioncube uses prebuilt PHP extension from their site, please follow guide on their site to install it.

For php.ini, you need to create your own, or copy current Apache PHP's php.ini , the target path for php.ini is in the output of "lsphp5 -i" or a phpinfo() page.
 
Top