Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

Error web

General questions about VestaCP
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
jopara
Posts: 3
Joined: Sun Jan 21, 2018 5:24 pm

Os: CentOS 5x
Web: apache + nginx
Error web
  • Quote

Post by jopara » Sun Jan 28, 2018 10:41 am

2274/5000
Hello, first of all to thank for VestaCP. I discovered it by chance and I'm quite happy with it. I have it installed on all my VPS.

I've only had one problem with some websites that happened to relate to see if anyone can tell me what to do to fix it.

You see, two of my websites use a script to launch the title and artist on those websites that are radio stations.

These websites use this code in a .php file
<?php
//get artist/title info
$artist = $_GET['artist'];
$title = $_GET['title'];

//create a temp file to store values for AJAX script
$r = fopen("temp_title.txt", "w");
fwrite($r, $artist." - ".$title);
fclose($r);
?>


This code is inserted in the index where it calls the cacion and artist
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<b>Here you'll see track title:</b>

<!-- begin update track title code -->
<div id="track_name"></div>

<script type="text/javascript">
function UpdateTitle()
{
var xmlhttp;
//get "track name" block
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function()
{
if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
{
var s = xmlhttp.responseText;
document.getElementById('track_name').innerHTML = s;
}
}
//use random number in request to prevent caching
var rand_no = Math.random();
rand_no = rand_no * 100;
//read the "temp_title.txt" file
xmlhttp.open("POST", "/temp_title.txt?"+rand_no, true);
xmlhttp.send();
}
//
setInterval("UpdateTitle()", 1000);
UpdateTitle();
</script>
<!-- end update track title code -->

</body>
</html>

This code is inserted in the index where it calls the cacion and artist and all this is done through the radio broadcast program that writes a .txt file that is also uploaded to the server. The latter is with 777 permissions for reading and writing.

All this worked correctly in cPanel, but when migrating the webs to vesta, they stopped working.

Any ideas?

Thanks and pedon for the novel.
Top

ScIT
Support team
Posts: 617
Joined: Mon Feb 23, 2015 4:13 pm

Os: Ubuntu 17x
Web: apache + nginx
Re: Error web
  • Quote

Post by ScIT » Sun Jan 28, 2018 12:33 pm

did you checked the log? what error appears?
Top

jopara
Posts: 3
Joined: Sun Jan 21, 2018 5:24 pm

Os: CentOS 5x
Web: apache + nginx
Re: Error web
  • Quote

Post by jopara » Sun Feb 04, 2018 9:36 am

2018/02/04 10:17:09 [error] 27069#27069: *292656 connect() failed (111: Connection refused) while connecting to upstream, client: 79.145.33.255, server: almuhost.com, request: "POST /temp_title.txt?33.34451206496094 HTTP/1.1", upstream: "https://185.129.251.100:8443/temp_title ... 1206496094", host: "almuhost.com", referrer: "https://almuhost.com/track_title/showtitle.htm"
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Error web
  • Quote

Post by mehargags » Sun Feb 04, 2018 5:21 pm

May be the system is not able to generate that temp file.
goto you /home/<vestauser>/conf/web/<domain>.apache.conf and put /tmp at last in front of basedir value.

If the error stops after that, you may have to give a proper relative path in your file generation script to generate the temp_title.txt
Top

jopara
Posts: 3
Joined: Sun Jan 21, 2018 5:24 pm

Os: CentOS 5x
Web: apache + nginx
Re: Error web
  • Quote

Post by jopara » Sun Feb 04, 2018 6:46 pm

Forgive my clumsiness, but I do not understand anything.
The .txt file is correctly overwritten each time the software sends the data to you. The only thing that does not happen is that the name that is in the .txt, is shown on the web page.
Forgive the comparison, but in Cpanel he did it without problem.
Top

mehargags
Support team
Posts: 1096
Joined: Sat Sep 06, 2014 9:58 pm
Contact:
Contact mehargags
Website Skype

Os: Debian 8x
Web: apache + nginx
Re: Error web
  • Quote

Post by mehargags » Mon Feb 05, 2018 9:03 pm

Try adding /tmp to your basedir as I told you and post results
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password