Deploy the bitbucket code directly on production server

I am using the bitbucket to store our project. Now the problem is the project is very large and having more then 20k files in it. My server having FTP connection so i am not able to copy and paste the complete project code on server. So i want to direct deploy my code from bitbucket to my production server.

I can connect to the bitbucket server and make a git pull but i really want to find something to automate this.

I am looking for a easy and fast solution but i did not find anything for bitbucket, all solution seems to be designed for github…

Any service or tool for that to automate this process ?


Source: stackoverflow-php

script works on local host but not on live server

I have below script. It works perfect on local host but does not work on live server (hosting).

Actually the input value is from array but does not work.

echo $user_info[0] = 'http://'.Punycode::encodeHostname(trim($user_info[0]));

While this line input is given manually and it works perfect on live server.

echo $convert = 'http://'.Punycode::encodeHostname(trim('bücher.ch')); 

The code

<?php


include_once("punycode.class.php");
$post_list  = array();

$outputlist="";

if(isset($_POST["submit"])) {

    //$txturl = preg_replace('#^https?://#', '', rtrim($_POST['links'],'/'));
     $input_list =  preg_replace('/n+/', "n", trim($_POST['urllist']));

    $input_list = explode("n", $input_list);
    //shuffle($input_list);



        for($i=0;$i<count($input_list);$i++) {


            $post_list = (trim($input_list[$i]));
            $user_info = explode('|', $post_list);

            $user_info[0] = preg_replace('#^https?://#', '', rtrim($user_info[0],'/'));

            echo $user_info[0] = 'http://'.Punycode::encodeHostname(trim($user_info[0])); // This is not working Punycode::encodeHostname(trim($user_info[0]))
            echo '<br>';
            echo $convert = 'http://'.Punycode::encodeHostname(trim('bücher.ch')); // This line work perfect.
            $user_info[1];
            $user_info[2];


            $outputlist .= 'Scrpated vlaue for input ' . $user_info[0]. '==>' .$user_info[1] . '==>' . $user_info[2] .'
' ;
        }
}   
?>


<form method="POST" action="problem.php">
<textarea name = "urllist" rows ="20" cols="150" placeholder="Past Urls here! domain.com|phonenumber|email@address.com"><?php if(!empty($_POST["urllist"])) { echo $_POST["urllist"]; } ?></textarea>   
<textarea name = "output" rows ="20" cols="150"  > <?php echo $outputlist;  ?></textarea>   
<br/><br/>
<center>
<input type="submit" name="submit" value="Generate">
</center>
</form>

Use this line for input test..

bücher.ch/|username|password

This script is live here globalitsoft.net/scripts/problem.php


Source: stackoverflow-php

Node.js doesn’t serve page on proxy pass from apache

I’ve found similar questions on Stack and other forums but no working answers.
I have a working node.js chat server running on port 3000 of my local machine. I have Apache running on port 80. Both work great. When I go to localhost in my address bar I get Apache. When I type localhost:3000 I get the nodes app. However, when I set up a ProxyPass to make the nodejs app run on localhost/node the page loads, but the server isn’t processing the page. It renders but node doesn’t work.

<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName localhost
ProxyPass /node http://localhost:3000/
ProxyPassReverse /node http://localhost:3000/
</VirtualHost>

This works, but I don’t want to send ALL requests to nodes

<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName localhost
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
</VirtualHost>


Source: stackoverflow-javascript

Choosing programming platform/language: MQTT, DB & Webserver

I want to write a server application which is able to subscribe to an MQTT broker, store the data it receives in a database like MySQL and also present the data in a webpage, but I don’t know what the best setup would be for this.

Options I thought of:

  1. Separate programs for all steps: One which handles the connection between the MQTT broker in Java or something and another framework in a framework I’m familiar with like RoR or PHP.

  2. A complete package written in NodeJS which does everything self contained.

Which of these is the most efficient and/or flexible approach, or am I completely missing the mark and do you have a better solution?


Source: stackoverflow-php