PHP Msgpack安装报错处理

Standard

libtool: Version mismatch error…

phpize –clean;
phpize;
rm aclocal.m4;
aclocal;
autoconf;
./configure;
make;
make install;

done!

ps:
MessagePack是一种新的基于二进制的对象序列化类库。它可以像JSON那样,在许多种语言之间交换结构对象;但是它比JSON更快速也更轻巧。

以下转载自:http://hi.baidu.com/yzkuang/blog/item/557e4f24423d8136c9955908.html

1.autoscan (autoconf): 扫描源代码以搜寻普通的可移植性问题,比如检查编译器,库,头文件等,生成文件configure.scan,它是configure.ac的一个雏形。
2.aclocal (automake):根据已经安装的宏,用户定义宏和acinclude.m4文件中的宏将configure.ac文件所需要的宏集中定义到文件 aclocal.m4中。aclocal是一个perl 脚本程序,它的定义是:“aclocal - create aclocal.m4 by scanning configure.ac”
 
user input files   optional input     process          output files
================   ==============     =======          ============
 
                    acinclude.m4 - - - - -.
                                          V
                                      .-------,
configure.ac ------------------------>|aclocal|
                 {user macro files} ->|       |------> aclocal.m4
                                      `-------'
3.autoheader(autoconf): 根据configure.ac中的某些宏,比如cpp宏定义,运行m4,声称config.h.in
 
user input files    optional input     process          output files
================    ==============     =======          ============
 
                    aclocal.m4 - - - - - - - .
                                             |
                                             V
                                     .----------,
configure.ac ----------------------->|autoheader|----> autoconfig.h.in
                                     `----------'
4.automake: automake将Makefile.am中定义的结构建立Makefile.in,然后configure脚本将生成的Makefile.in文件转换为Makefile。如果在configure.ac中定义了一些特殊的宏,比如AC_PROG_LIBTOOL,它会调用libtoolize,否则它会自己产生config.guess和config.sub
 
user input files   optional input   processes          output files
================   ==============   =========          ============
 
                                     .--------,
                                     |        | - - -> COPYING
                                     |        | - - -> INSTALL
                                     |        |------> install-sh
                                     |        |------> missing
                                     |automake|------> mkinstalldirs
configure.ac ----------------------->|        |
Makefile.am  ----------------------->|        |------> Makefile.in
                                     |        |------> stamp-h.in
                                 .---+        | - - -> config.guess
                                 |   |        | - - -> config.sub
                                 |   `------+-'
                                 |          | - - - -> config.guess
                                 |libtoolize| - - - -> config.sub
                                 |          |--------> ltmain.sh
                                 |          |--------> ltconfig
                                 `----------'
5.autoconf:将configure.ac中的宏展开,生成configure脚本。这个过程可能要用到aclocal.m4中定义的宏。
 
user input files   optional input   processes          output files
================   ==============   =========          ============
 
                   aclocal.m4 - - - - - -.
                                         V
                                     .--------,
configure.ac ----------------------->|autoconf|------> configure ----->autoconfig.h,Makefile

解决编译php mysqli模块时的报错

Standard

错误信息:
wrong mysql library version or lib not found

如下既可:

./configure --with-php-config= /usr/local/php/bin/php-config --enable-embedded-mysqli=shared --with-mysqli=/usr/local/mysql/bin/mysql_config

VB.NET调用WebService时报错

Standard

加入wsDataContent.Credentials = System.Net.CredentialCache.DefaultCredentials即正常(*号标出)

‘WebService源文件
Private dsData As DataSet

Private Sub LoadDataSet()

Dim successful As Boolean
successful = True

Dim errorMessage As String
errorMessage = “”

dsData = New DataSet
dsData.DataSetName = “db”

Try
Dim dbConn As New OleDbConnection
With dbConn
.ConnectionString = “PROVIDER=SQLOLEDB;Server=(local);DATABASE=db_name;UID=sa;PWD=;”
.Open()
End With

Try
Dim dbCmdUser As New OleDbCommand
dbCmdUser.Connection = dbConn
dbCmdUser.CommandText = “SELECT * FROM tb_user”
Dim dbCmdProject As New OleDbCommand
dbCmdProject.Connection = dbConn
dbCmdProject.CommandText = “SELECT * FROM tb_project”
Dim dbCmdJob As New OleDbCommand
dbCmdJob.Connection = dbConn
dbCmdJob.CommandText = “SELECT * FROM tb_job”
Dim dbCmdTopic As New OleDbCommand
dbCmdTopic.Connection = dbConn
dbCmdTopic.CommandText = “SELECT * FROM tb_topic”

Dim dbAdUser As New OleDbDataAdapter
dbAdUser.SelectCommand = dbCmdUser
Dim dbAdProject As New OleDbDataAdapter
dbAdProject.SelectCommand = dbCmdProject
Dim dbAdJob As New OleDbDataAdapter
dbAdJob.SelectCommand = dbCmdJob
Dim dbAdTopic As New OleDbDataAdapter
dbAdTopic.SelectCommand = dbCmdTopic

dbAdUser.Fill(dsData, “User”)
dbAdProject.Fill(dsData, “Project”)
dbAdJob.Fill(dsData, “Job”)
dbAdTopic.Fill(dsData, “Topic”)
Catch ex A* **ception
successful = False
errorMessage = ex.Message.ToString
errorMessage = “Error reading data.”
Finally
dbConn.Close()
End Try
Catch ex A* **ception
successful = False
errorMessage = “Error opening data connention.”
End Try

If Not successful Then
Throw New Exception(errorMessage)
End If
End Sub

<WebMethod()> _
Public Function getDataSet() As DataSet
LoadDataSet()
Return dsData
End Function

‘VB.NET窗体源文件
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim wsDataContent As DataContent
wsDataContent = New DataContent
‘***********www.yemaosheng.com***********’
wsDataContent.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim ds As DataSet
ds = wsDataContent.getDataSet()
dgMain.DataSource = ds
dgMain.DataMember = “User”
Catch ex A* **ception
MsgBox(ex.Message, , “出错提示”)
End Try
End Sub

PHP文件上传时关于open_basedir的报错解决

Standard

PHP Upload files to the virtual host errors:
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/phpEIjcGh) is not within the allowed path(s): (/usr/local/apache/htdocs/) in /usr/local/apache/htdocs/xxxsite/upload.htm on line 21

Because web users to operate without permission belong to the “root” directory /tmp/

Solution:
Apache virtual server configuration file to add add the follow info:
<Directory “/usr/local/apache/htdocs/xxxsite”>
php_admin_value open_basedir /usr/local/apache/htdocs/xxxsite/:/tmp/
</Directory>