Dedicated server -
FreeBSD 8.2 -
amd64 -
Apache/2.2.21 -
PHP/5.3.9
I am trying of install the dependency manager for php composer, but composer needs the extension "phar".
Try
curl -sS https://getcomposer.org/installer | php
Get
The phar extension is missing.
Install it or recompile php without --disable-phar
In php.ini and extensions.ini extension=phar.so not found. Add line, but file search phar.so has not brought results.
php -i and php -m show extension phar not installed
Try
cd /usr/ports/archivers/php53-phar && make install clean
Get
php53-phar: No such file or directory
I think command portsnap fetch update delete old /usr/ports/archivers/php53-phar directory
Try
cd /usr/ports/archivers/php5-phar && make install clean
Get meny errors like
Unknown modifier 't'
Unknown modifier 't'
"/usr/ports/Mk/bsd.php.mk", line 267: Malformed conditional (defined(_POSTMKINCLUDED) && ${USE_PHP:tl} != "yes") "/usr/ports/archivers/php5-phar/../../lang/php5/Makefile", line 208: if-less endif Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
"/usr/ports/Mk/bsd.php.mk", line 267: Malformed conditional (defined(_POSTMKINCLUDED) && ${USE_PHP:tl} != "yes") Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
"/usr/ports/Mk/bsd.sites.mk", line 1049: Malformed conditional (!empty(_PERL_CPAN_ID) && ${_PERL_CPAN_FLAG:tl} == "cpan") Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
"/usr/ports/Mk/bsd.port.mk", line 2948: warning: Missing closing parenthesis for defined() Unknown modifier 't'
"/usr/ports/Mk/bsd.port.mk", line 2948: Malformed conditional (((!defined(OPTIONS_DEFINE) && !defined(OPTIONS_SINGLE) && !defined(OPTIONS_MULTI)) && !defined(OPTIONS_GROUP) && !defined(OPTIONS_RADIO) || defined(CONFIG_DONE_${PKGBASE:tu}) || defined(PACKAGE_BUILDING) || defined(BATCH))) "/usr/ports/Mk/bsd.port.mk", line 2950: if-less endif Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier '-'
"/usr/ports/Mk/bsd.port.mk", line 4358: Need an operator Unknown modifier '-'
"/usr/ports/Mk/bsd.port.mk", line 4358: Need an operator Unknown modifier '-'
"/usr/ports/Mk/bsd.port.mk", line 4358: Need an operator Unknown modifier '-'
"/usr/ports/Mk/bsd.port.mk", line 4358: Need an operator Unknown modifier '-'
"/usr/ports/Mk/bsd.port.mk", line 4358: Need an operator Unknown modifier '-'
"/usr/ports/Mk/bsd.port.mk", line 4358: Need an operator Unknown modifier '-'
"/usr/ports/Mk/bsd.port.mk", line 4358: Need an operator Unknown modifier '-'
"/usr/ports/Mk/bsd.port.mk", line 4358: Need an operator Unknown modifier 't'
Unknown modifier 't'
"/usr/ports/Mk/bsd.port.mk", line 4903: warning: Missing closing parenthesis for target() "/usr/ports/Mk/bsd.port.mk", line 4903: warning: Missing closing parenthesis for target() Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
Unknown modifier 't'
8 open conditionals:
at line 5785 (evaluated to true)
at line 5785 (evaluated to true)
at line 5785 (evaluated to true)
at line 5785 (evaluated to true)
at line 5785 (evaluated to true)
at line 5785 (evaluated to true)
at line 4903 (evaluated to true)
at line 4903 (evaluated to true) make: fatal errors encountered -- cannot continue
This version for PHP 5.4?
How do I install the phar extension on PHP 5.3.9?
PHP 5.3 isn't officially supported in FreeBSD ports anymore, as well as FreeBSD 8.x itself.
Your options are:
Obtain ports tree for FreeBSD 8.x. portsnap won't do, use svn to
checkout FreeBSD ports tree on right branch/revision.
Compile phar from source. As this is just extension, it shouldn't be
too hard.
Related
I want to build ICU4C code for HP UX platform .
ICU4C repo -> https://github.com/unicode-org/icu/tree/release-70-1.
HP-UX version that i am using -
HP-UX B.11.31 U ia64 ,
aCC compiler version that i am using -
HP C/aC++ B3910B A.06.29
I tried +std=c++11 and -AA option with aCC like ->
aCC -DU_ATTRIBUTE_DEPRECATED= -D_REENTRANT -D_THREAD_SAFE -DU_HAVE_ELF_H=1 -DU_HAVE_STRTOD_L=0 -I../common +std=c++11 -w +O2 +Ofltacc +check=stack -AA +DD64 -mt -AA -Wc,-ansi_for_scope,on +W740 +W749 +W823 +W4232 -DVXPSP_CCFLAGS -c +Z -o stubdata.o stubdata.cpp
But when i am building stubdata.cpp file from icu stubdata project its giving me error related to unique_ptr as -
"../common/unicode/localpointer.h", line 238: error #2283: qualified name is not allowed explicit LocalPointer(std::unique_ptr<T> &&p)
"../common/unicode/localpointer.h", line 238: error #2018: expected a ")"
explicit LocalPointer(std::unique_ptr<T> &&p)
^
"../common/unicode/localpointer.h", line 239: error #2028: expression must
have a constant value
: LocalPointerBase<T>(p.release()) {}
^
"../common/unicode/localpointer.h", line 238: error #2771: "explicit" is not
allowed
explicit LocalPointer(std::unique_ptr<T> &&p)
^
"../common/unicode/localpointer.h", line 239: error #2065: expected a ";"
: LocalPointerBase<T>(p.release()) {}
^
"../common/unicode/localpointer.h", line 413: error #2283: qualified name is
not allowed
explicit LocalArray(std::unique_ptr<T[]> &&p)
^
"../common/unicode/localpointer.h", line 413: error #2018: expected a ")"
explicit LocalArray(std::unique_ptr<T[]> &&p)
^
"../common/unicode/localpointer.h", line 414: error #2028: expression must
have a constant value
: LocalPointerBase<T>(p.release()) {}
^
"../common/unicode/localpointer.h", line 413: error #2771: "explicit" is not
allowed
explicit LocalArray(std::unique_ptr<T[]> &&p)
^
"../common/unicode/localpointer.h", line 414: error #2065: expected a ";"
: LocalPointerBase<T>(p.release()) {}
^
"../common/unicode/udata.h", line 434: error #2283: qualified name is not
allowed
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
"../common/unicode/udata.h", line 434: error #2018: expected a ")"
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
"../common/unicode/udata.h", line 434: error #2040: expected an identifier
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
"../common/unicode/udata.h", line 434: error #2079: expected a type specifier
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
"../common/unicode/udata.h", line 434: error #2771: "explicit" is not allowed
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
"../common/unicode/udata.h", line 434: error #2065: expected a ";"
U_DEFINE_LOCAL_OPEN_POINTER(LocalUDataMemoryPointer, UDataMemory, udata_close);
^
16 errors detected in the compilation of "stubdata.cpp".
It seems like aCC compiler don't have support for this C++ 11 feature unique_ptr .
Also i tried to run a sample standalone program having unique_ptr , but its not able to compile . Whereas other c++11 features like nullptr / range based for loop etc are compiled with aCC compiler on HP .
Any suggestions?
A plugin is generating the following error:
Got error 'PHP message: PHP Warning: preg_match(): Compilation failed: missing closing parenthesis at offset 946 - DeferJS.php on line 78
The line of code that generates the error:
if ( preg_match( '#(' . $exclude_defer_js . ')#i', $tag['url'] ) ) {
Thanks for any help
$exclude_defer_js must contain special characters.
Use preg_quote:
if ( preg_match( '#' . preg_quote($exclude_defer_js, '#') . '#i', $tag['url'] ) ) {
I am trying to use file.insert_line_if_no_match for CIDR address:
attributes/default.rb:
default["chefclustercidr"]["ip"] = "a.b.c.d/24"
recipe/default.rb
ruby_block "chef-backend.rb" do
block do
file = Chef::Util::FileEdit.new("/etc/chef-backend/chef-backend.rb")
file.insert_line_if_no_match("/publish_address/" , "publish_address i#{node['chefclusterbe1']['ip']}")
file.insert_line_if_no_match("/postgresql/" , "postgresql.md5_auth_cidr_addresses = ["samehost", "samenet", "#{node['chefclustercidr']['ip']}/24"]")
file.write_file
end
end
but getting ruby syntax error
$ruby -c default.rb
default.rb:95: syntax error, unexpected tIDENTIFIER, expecting ')'
th_cidr_addresses = ["samehost", "samenet","#{node['chefclus
^
default.rb:95: syntax error, unexpected tIDENTIFIER, expecting keyword_end
resses = ["samehost", "samenet","#{node['chefclustercidr']['
^
default.rb:99: syntax error, unexpected keyword_end, expecting end-of-input
FileEdit is an internal class and using it from recipe code is NOT SUPPORTED. Do not use it. Period.
That said, the problem is you have unescaped double quotes in your string.
Instead of insert_line_if_no_match you can deal with it another way, using bash and grep. I have added the way to another question you can have a look here
here is the bash resource i usually use to append to files only if there is no match:
bash 'append line(s) to file if it doesnt exist' do
user 'user'
code <<-EOS
cat >>/home/file <<EOL
*.* ##172.167.189.67:514
EOL
EOS
not_if "grep -q 172.167.189.67 /home/file"
end
you may need to run cookstyle on that ^
getting this error, where my code is:
#!/bin/bash
# argument passed to script (or any other source if needed like intern to script)
file=$1
rs=$2
clin_sig=$3
mut_type=$4
pos=$6
allele=$7
chain_pos=$8
abs_pos=$(($pos+$chain_pos))
echo $abs_pos
where command line is:
./program.sh 1 1 1 1 1 1 1
./program.sh: line 11: 1+: syntax error: operand expected (error token is "+")
similar questions have been solved using $(()) to do arithmetic, this is not working for me.
use default value if variable is empty
e.g:
pos=${6:-0}
chain_pos=${8:-0}
inside $((…)) you omit the $ in front of variable names:
abs_pos=$(( pos + chain_pos ))
Here is my original code listed below.
if(ereg($pattern,strtolower($this->get_domain())) && !ereg("^-|-$",strtolower($this->get_domain())) && !preg_match("/--/",strtolower($this->get_domain()))){
This is the error
Deprecated: Function ereg() is deprecated in
Then I replaced the ereg with preg_match below. I receive this error
if(preg_match($pattern,strtolower($this->get_domain())) && !preg_match("^-|-$",strtolower($this->get_domain())) && !preg_match("/--/",strtolower($this->get_domain()))){
Warning: preg_match() [function.preg-match]: No ending delimiter '^'
found in
I tried to to put / before the ^ and after the $ but still no luck. May I get some assistance from someone who might know how to fix this error.
Add delimiters to your regexes:
$pattern = "/^[a-z".$idn."0-9\-]{3,}$/";// same for "/^[a-z0-9\-]{3,}$/"
// here __^ and here __^
if(preg_match($pattern, strtolower($this->get_domain())) &&
!preg_match("/^-|-$/",strtolower($this->get_domain())) &&
// __^ __^
!preg_match("/--/", strtolower($this->get_domain()))){