Skip to content

Commit

Permalink
delete src
Browse files Browse the repository at this point in the history
  • Loading branch information
bypanelcom committed Jul 31, 2015
1 parent ca33005 commit 52fe2aa
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 6 deletions.
3 changes: 3 additions & 0 deletions config/laravel.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
location / {
try_files $uri $uri/ /index.php?$query_string;
}
2 changes: 0 additions & 2 deletions config/phpwind.conf

This file was deleted.

3 changes: 1 addition & 2 deletions include/php-5.3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ src_url=https://downloads.sourceforge.net/project/mhash/mhash/$mhash_version/mhas
src_url=https://downloads.sourceforge.net/project/mcrypt/MCrypt/$mcrypt_version/mcrypt-$mcrypt_version.tar.gz && Download_src
src_url=https://mirrors.linuxeye.com/lnmp/src/fpm-race-condition.patch && Download_src
src_url=https://www.php.net/distributions/php-$php_3_version.tar.gz && Download_src
src_url=https://mirrors.linuxeye.com/lnmp/src/php5.3patch && Download_src

tar xzf libiconv-$libiconv_version.tar.gz
cd libiconv-$libiconv_version
Expand All @@ -34,7 +33,7 @@ cd libmcrypt-$libmcrypt_version
./configure
make && make install
ldconfig
cd libltdl/
cd libltdl
./configure --enable-ltdl-install
make && make install
cd ../../
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ IPADDR=`./include/get_ipaddr.py`
PUBLIC_IPADDR=`./include/get_public_ipaddr.py`
[ "`./include/get_ipaddr_state.py $PUBLIC_IPADDR`" == '\u4e2d\u56fd' ] && IPADDR_STATE=CN

mkdir -p src $wwwroot_dir/default $wwwlogs_dir
mkdir -p $wwwroot_dir/default $wwwlogs_dir

# choice upgrade OS
while :
Expand Down
80 changes: 80 additions & 0 deletions src/php5.3patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
diff --git a/main/rfc1867.c b/main/rfc1867.c
index b3f94ec..7613119 100644
--- a/main/rfc1867.c
+++ b/main/rfc1867.c
@@ -33,6 +33,8 @@
#include "php_variables.h"
#include "rfc1867.h"
#include "ext/standard/php_string.h"
+#include "ext/standard/php_smart_str.h"
+

#define DEBUG_FILE_UPLOAD ZEND_DEBUG

@@ -462,6 +464,66 @@ static int find_boundary(multipart_buffer *self, char *boundary TSRMLS_DC)
static int multipart_buffer_headers(multipart_buffer *self, zend_llist *header TSRMLS_DC)
{
char *line;
+ mime_header_entry entry = {0};
+ smart_str buf_value = {0};
+ char *key = NULL;
+
+ /* didn't find boundary, abort */
+ if (!find_boundary(self, self->boundary TSRMLS_CC)) {
+ return 0;
+ }
+
+ /* get lines of text, or CRLF_CRLF */
+
+ while( (line = get_line(self TSRMLS_CC)) && line[0] != '\0' )
+ {
+ /* add header to table */
+ char *value = NULL;
+
+ /*if (php_rfc1867_encoding_translation(TSRMLS_C)) {
+ //self->input_encoding = zend_multibyte_encoding_detector((unsigned char *)line, strlen(line), self->detect_order, self->detect_order_size TSRMLS_CC);
+ }*/
+
+ /* space in the beginning means same header */
+ if (!isspace(line[0])) {
+ value = strchr(line, ':');
+ }
+
+ if (value) {
+ if(buf_value.c && key) {
+ /* new entry, add the old one to the list */
+ smart_str_0(&buf_value);
+ entry.key = key;
+ entry.value = buf_value.c;
+ zend_llist_add_element(header, &entry);
+ buf_value.c = NULL;
+ key = NULL;
+ }
+
+ *value = '\0';
+ do { value++; } while(isspace(*value));
+
+ key = estrdup(line);
+ smart_str_appends(&buf_value, value);
+ } else if (buf_value.c) { /* If no ':' on the line, add to previous line */
+ smart_str_appends(&buf_value, line);
+ } else {
+ continue;
+ }
+ }
+ if(buf_value.c && key) {
+ /* add the last one to the list */
+ smart_str_0(&buf_value);
+ entry.key = key;
+ entry.value = buf_value.c;
+ zend_llist_add_element(header, &entry);
+ }
+
+ return 1;
+}
+static int multipart_buffer_headers_bak(multipart_buffer *self, zend_llist *header TSRMLS_DC)
+{
+ char *line;
mime_header_entry prev_entry, entry;
int prev_len, cur_len;

2 changes: 1 addition & 1 deletion vhost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ if [ "$rewrite_yn" == 'n' ];then
else
echo
echo "Please input the rewrite of programme :"
echo "${CMSG}wordpress${CEND},${CMSG}discuz${CEND},${CMSG}opencart${CEND},${CMSG}phpwind${CEND},${CMSG}typecho${CEND},${CMSG}ecshop${CEND},${CMSG}drupal${CEND},${CMSG}joomla${CEND} rewrite was exist."
echo "${CMSG}wordpress${CEND},${CMSG}discuz${CEND},${CMSG}opencart${CEND},${CMSG}laravel${CEND},${CMSG}typecho${CEND},${CMSG}ecshop${CEND},${CMSG}drupal${CEND},${CMSG}joomla${CEND} rewrite was exist."
read -p "(Default rewrite: other):" rewrite
if [ "$rewrite" == "" ]; then
rewrite="other"
Expand Down

0 comments on commit 52fe2aa

Please sign in to comment.