BigShieldsy Posted May 5, 2014 Author Share Posted May 5, 2014 (edited) hey guys after doing some investigating into my files through the cpanel File Manager and found a folder called /tmp in this location /home/bellg980/ I have since changed the permissions on this page and have now managed to get a connection reset error now.. I do hope that this is down the issue the hosting company are experiencing at the moment.. However does not do me any good during testing lol. the page used to load up to the move function but since the changes to the /tmp permissions the page has been taking too long to load Edited May 5, 2014 by BigShieldsy Link to comment Share on other sites More sharing options...
Don E Posted May 5, 2014 Share Posted May 5, 2014 The whole site seems down at the moment. Are you sure its something with the hosting company on why the site is currently down? Link to comment Share on other sites More sharing options...
BigShieldsy Posted May 5, 2014 Author Share Posted May 5, 2014 Yeah Don the whole hosting company are having some issue with slow or unresponsive connections Here is the message: Slow/unresponsive websites We have recently received numerous reports regarding slow connectivity to our services (website/cPanel/Webmail). We have forwarded this issue to our system department and have contacted the datacenter technicians as well. The issue seems to be affecting just some part of our clients, particularly the ones using Comcast provider. What we have observed so far, is that the connection is broken of at a node in the middle of the network pathway in the Comcast network. This issue is quite difficult to deal with since the source of it is out of our reach. You could try to press the issue by contacting Comcast support team regarding this. We will make sure to communicate with the relevant parties and try to resolve this as soon as possible. We understand the inconvenience this is causing you and we are trying to resolve the issue as swiftly as possible. Thank you for your patience and understanding. However before i made the changes it was making it through its only been since the changes that i have been giving this error. However on writing this the last request had made it through and produced the "error moving file"..If you are looking at the live website please be patient with it haha Link to comment Share on other sites More sharing options...
Don E Posted May 5, 2014 Share Posted May 5, 2014 Ah ok, looks like its loading now but going very slow. For sake of narrowing down the issue, can you post your recent updated code in code tags for uploading the videos, both html and php code? Link to comment Share on other sites More sharing options...
BigShieldsy Posted May 5, 2014 Author Share Posted May 5, 2014 (edited) Ok These are the changes i have made since the topic has been started:.htaccess (located at /home/bellg980/public_html): SetEnv PHPRC "/home/bellg980/public_html" php.ini (located at /home/bellg980/public_html): upload_tmp_dir = "/home/bellg980/public_html/tmp1" Permissions:/tmp (located at /home/bellg980/) 777 /tmp1(located at /home/bellg980/public_html/) 777 /MembersArea (located at /home/bellg980/public_html/) 777 /Highlights (located at /home/bellg980/public_html/MembersArea/) 777 /Videos (located at /home/bellg980/public_html/MembersArea/Highlights/) 777 upload_highlights.php (Script) (located at /home/bellg980/public_htmlMembersArea/Highlights/) 777 highlight_upload.php (Html) (located at /home/bellg980/public_htmlMembersArea/Highlights/) 777 highlight_upload.php (code) <?php session_start(); $loggedin = $_SESSION['loggedin']; //include '../Docs/notloggedin.php'; //include '../Docs/check_mem.php';?><html><head> <link rel="stylesheet" type="text/css" href="../../Stylesheets/Main_Sheet.css"/> <link rel="stylesheet" type="text/css" href="../../Stylesheets/Menus/Menu_System.css"/> <title>Bellgrove AFC - Highlight Upload</title> <link rel="Shortcut Icon" href="../../Pictures/Club/Badge.ico"> </head><body> <section class="Main-Container"> <section class="Left-side-Container"> <section class="Logo"> <img src = "../../Pictures/Club/TeamBadge.png"/> <h1>Bellgrove AFC</h1> </section> <hr/> <section class="Main-Menu"> <img src="../../Pictures/Menu.jpg" width="140px" style="margin:2px 0 4px 6px;"/> <br/> <section class="menuwrapper"><!-- Navigation System --> <ul><!-- LEVEL ONE --> <li><a href="../../index.html">Home</a></li> <li><a href="../../Squad_Selection.html">Squads</a> <ul><!-- LEVEL TWO --> <li><a href="SaturdaySquad.html">Saturday Squad</a></li> <li><a href="SundaySquad.html">Sunday Squad</a></li> </ul> </li> <li><a href="../../Fixture_Selection.html">Team Fixtures</a> <ul><!-- LEVEL TWO --> <li><a href="../../SatFixtures_13_14.html">Saturday Team</a> <ul> <li><a href="../../SatFixtures_13_14.html">Season 13/14</a></li> <!--<li><a href="../Archive/SatFixtures_12_13.html">Season 12/13</a></li>--> </ul> </li> <li><a href="../../SunFixtures_13_14.html">Sunday Team</a> <ul> <li><a href="../../SunFixtures_13_14.html">Season 13/14</a></li> <!--<li><a href="../Archive/SunFixtures_12_13.html">Season 12/13</a></li>--> </ul> </li> </ul> </li> <li><a href="../../Table_Selection.html">League Tables</a> <ul><!-- LEVEL TWO --> <li><a href="../../GDSML_League_13_14.html">Saturday League</a> <ul> <li><a href="../../GDSML_League_13_14.html">Season 13/14</a></li> <li><a href="../../Archive/SatLeague_12_13.html">Season 12/13</a></li> </ul> </li> <li><a href="../../SCAFL_League_13_14.html">Sunday League</a> <ul> <li><a href="../../SCAFL_League_13_14.html">Season 13/14</a></li> <li><a href="../../Archive/SunLeague_12_13.html">Season 12/13</a></li> </ul> </li> </ul> </li> <li><a href="../../Sponsors.html">Sponsors</a> <ul><!-- LEVEL TWO --> <li><a href="../../Sponsors.html">Club Sponsors</a> <ul><!-- LEVEL THREE --> <li><a href="http://www.yourdebtexpert.com" target="_blank" title="Click to open new tab">Your Debt Expert</a></li> <li><a href="http://www.musicmagpie.com" target="_blank" title="Click to open new tab">Musicmagpie</a></li> <li><a href="http://www.turnbullmccarron.com" target="_blank" title="Click to open new tab">Turnbull and McCarron</a></li> <li><a href="http://www.armstrongs-glasgow.co.uk" target="_blank" title="Click to open new tab">Armstong Bar</a></li> </ul> </li> <li><a href="../../Sponsors.html">League Sponsors</a> <ul><!-- LEVEL THREE --> <li><a href="http://www.harleysskybar.com/" target="_blank" title="Click to open new tab">Harley's Skybar</a></li> <li><a href="http://www.hisltd.com" target="_blank" title="Click to open new tab">Highland Industrial Supplies</a></li> </ul> </li> </ul> </li> <li><a href="../../Club_Information.html">Club Information</a> <ul><!-- LEVEL TWO --> <li><a href="http://www.facebook.com/profile.php?id=100003892391812" target="_blank" title="Click to open new tab">FACEBOOK</a></li> <li><a href="https://twitter.com/AFCBellgrove" target="_blank" title="Click to open new tab">Twitter</a></li> <li><a href="mailto:bellgroveafc@gmail.com?subject=Please Enter Your Subject!" title="Click to Email the club">Email Us</a></li> </ul> </li> <li><a href="../Pages/welcome.php">Members</a> <ul> <li><a href="#">Chat Room</a></li> <li><a href="../Fixtures/fixture_selection.html">Reports</a></li> <li><a href="#">Highlights</a></li> <li><a href="../Logout/logout.php">Logout</a></li> </ul> </li> </ul> </section> <br/> <img src = "../../Pictures/RoyalArmsScotland.png" width = "120px" height = "130px" style="margin-left:10%;"/> </section> </section> <section class="Right-side-Container"> <section class="Header"> <section class="HeaderPictureLeft"> <img src="../../Pictures/Fix_n_Leag/GDSML_league_cup.png" height="100px" width="120px" /> </section> <section class="HeaderPictureRight"> <img src="../../Pictures/Fix_n_Leag/SCAFL_LeagueWinners.png" height="100px" width="120px" /> </section> <section class="HeaderCenter"> <li class="Photos"><img src="../../Pictures/Club/TeamPhoto2.jpg" width="90" height="100"/></li> <li class="Photos"><img src="../../Pictures/Club/SeeMe1.jpg" width="90" height="100"/></li> <li class="Photos"><img src="../../Pictures/Club/Club1.jpg" width="90" height="100"/></li> <li class="Photos"><img src="../../Pictures/Club/SeeMe2.jpg" width="90" height="100"/></li> <li class="Photos"><img src="../../Pictures/Club/TeamPhoto1.jpg" width="90" height="100"/></li> </section> <section class="memberNav"> <h4> <? if(($member_level == 0)||($member_level == 1)){echo ' Chat Room - <a href="../Fixtures/fixture_selection.php"> Match Reports </a> - <a href="../Fixtures/fixture_selection.php"> Match Highlights </a> - <a href="../Logout/logout.php"> Logout </a>';} if(($member_level == 2)||($member_level == 3)){echo ' Chat Room - <a href="../Fixtures/fixture_selection.php"> Match Reports </a> - <a href="../Fixtures/fixture_selection.php"> Match Highlights </a> - <a href="../Reports/report_upload.php">Report Upload </a> - <a href="../Highlights/highlight_upload.php"> Highlight Upload </a> - <a href="../Logout/logout.php"> Logout </a>';} ?> </h4> </section> </section> <section class="Contents-Container"> <section class="Contents"> <form enctype="multipart/form-data" method="post" action="upload_highlight.php"> <table class="report_upload_form" cellpadding="4" cellspacing="0"> <tr> <td width="20%" align="left" valign="top">Home Team:</td> <td width="80%"><input name="home_team" type="text" id="home_team" value="<? echo $home_team; ?>"></td> </tr> <tr> <td align="left" valign="top">Away Team</td> <td><input name="away_team" type="text" id="away_team" value="<? echo $away_team; ?>"></td> </tr> <tr> <td align="left" valign="top">Score</td> <td><input name="score" type="text" id="score" value="<? echo $score; ?>"></td> </tr> <tr> <td align="left" valign="top">Fixture</td> <td> <select name="fixture"> <option value= '<? echo $fixture = 0; ?>'>GDSML</option> <option value= '<? echo $fixture = 1; ?>'>League Cup</option> <option value= '<? echo $fixture = 2; ?>'>Away</option> <option value= '<? echo $fixture = 3; ?>'>Away</option> <option value= '<? echo $fixture = 4; ?>'>Scottish Cup</option> <option value= "#">.................</option> <option value= '<? echo $fixture = 5; ?>'>SCAFL</option> <option value= '<? echo $fixture = 6; ?>'>GlassCo Cup</option> <option value= '<? echo $fixture = 7; ?>'>Presidents Cup</option> <option value= '<? echo $fixture = 8; ?>'>Away</option> <option value= '<? echo $fixture = 9; ?>'>Scottish Cup</option> </select> </td> </tr> <tr> <td align="left" valign="top">Team</td> <td> <select name="team"> <option value="Saturday">Saturday</option> <option value="Sunday">Sunday</option> </select> </td> </tr> <tr> <td align="left" valign="top">Video File:</td> <td><input name="video" type="file" id="video"></td> </tr> <tr> <td align="left" valign="top"> </td> <td><input type="submit" name="Submit" value="Upload Report"></td> </tr> </table> </form> </section> </section> <section class="Advert-Container"> <section><!-- Ad Three --> <a href="http://www.carringtondean.com" target="_blank"><img src="../../Pictures/Sponsors/Car_Dean.jpg" alt="Carrington Dean Logo" style="margin-top:15px;" /></a> </section> <hr/> <section><!-- Ad Four --> <a href= "http://www.turnbullmccarron.com" target="_blank"><img src="../../Pictures/Sponsors/Turnbull_McCarron.jpg" style="margin-bottom:5px;" /></a> </section> <hr/> <section><!-- Ad Five --> <a href= "http://www.hisltd.com" target="_blank"><img src="../../Pictures/Sponsors/H_I_S.jpg" style="margin-bottom:5px; height:150px;"/></a> </section> </section> </section> <section class="footer"> <hr/> <p>© COPYRIGHT STEVEN SHIELDS 2013</p> </section> </section></body></html> upload_highlight (code) <? ini_set('display_errors', 1); error_reporting(E_ALL); include '../Docs/db.php'; $home_team = $_POST['home_team']; $away_team = $_POST['away_team']; $fixture = $_POST['fixture']; $team = $_POST['team']; $score = $_POST['score']; $allowedExts = array("mp4", "ogg", "webm"); $temp = explode(".", $_FILES['video']['name']); $extension = end($temp); if(isset ($_FILES["video"])) { $name = $_FILES["video"]["name"]. "<br/>"; $type = $_FILES["video"]["type"]. "<br/>"; $size = $_FILES["video"]["size"]. "<br/>"; $tmp_name = $_FILES["video"]["tmp_name"]. "<br/>"; /*echo 'The file name is: ' . $name . '<br/>'; echo 'The file type is: ' . $type . '<br/>'; echo 'The file extension is: ' . $extension . '<br/>'; echo 'The file size is: ' . $size . '<br/>'; if ($size < 25000000){ echo 'The file size is: ' . $size . ' is correct <br/>'; } if ($extension == 'mp4'){ echo 'The file size is: ' . $extension . ' is correct <br/>'; }*/ if (($extension == 'mp4') && ($size < 25000000) && in_array($extension, $allowedExts)) { if ($_FILES['video']['error'] > 0) { echo "Return Code: " . $_FILES['video']['error'] . "<br>"; } else { echo 'PHPRC=' . getenv('PHPRC') . '<br>'; echo 'PHPRC=' . apache_getenv('PHPRC'); echo "Upload: " . $name . "<br>"; echo "Type: " . $type . "<br>"; echo "Size: " . ($size / 1024) . " kB<br>"; echo "Temp video: " . $tmp_name . "<br><br>"; $temp_video = 'Videos/' . $name; echo "temp_video name: " .$temp_video. "<br/>"; $sql = "SELECT * FROM highlight"; $result=mysql_query($sql); $rows=mysql_fetch_array($result); $location = $rows["location"]; if(($location == "") || ($location != $temp_video)){ echo 'The file name is: ' . $name . '<br/>'; echo 'The file type is: ' . $type . '<br/>'; echo 'The file size is: ' . $size . '<br/>'; $location = "/public_html/MembersArea/Highlights/Videos/" . $name; echo 'The new location of the video is: ' . $location; if(move_uploaded_file($tmp_name, $location)) { echo "Video Stored in: " . "Videos/" . $name; /*$sql1 = mysql_query("INSERT INTO highlight (location, team, posted) VALUES ('$location', '$team', now())") or die (mysql_error()); echo '<br /> Video location added to database <br />';*/ }else{ echo 'Error moving file'; } } else { echo "The File named: " .$name . " already exists. <br>"; } } } else { echo "Invalid video"; } }?> Edited May 5, 2014 by BigShieldsy Link to comment Share on other sites More sharing options...
BigShieldsy Posted May 6, 2014 Author Share Posted May 6, 2014 (edited) Sorry forgot about phpinfo.php (located at /home/bellg980/public_html) 644 highlights.php (located at /home/bellg980/public_html/MembersArea/Highlights/) 664 This file is being used at the moment but will be used to player the selected video. Edited May 6, 2014 by BigShieldsy Link to comment Share on other sites More sharing options...
Don E Posted May 6, 2014 Share Posted May 6, 2014 (edited) upload_highlights.php (Script) (located at /home/bellg980/public_htmlMembersArea/Highlights/) 777 highlight_upload.php (Html) (located at /home/bellg980/public_htmlMembersArea/Highlights/) 777 Both upload_highlights.php and highlight_upload.php are located in the Highlights directory along with the Videos directory? For the move_upload_file function, for the destination try if one of these work: $location = "Videos/" . $name;$location = "MembersArea/Highlights/Videos/" . $name; //don't need public_html before MembersArea Also, after viewing the php.ini you made at http://bellgroveafc.com/php.ini, I don't think it's being used. When setting this:SetEnv PHPRC "/home/bellg980/public_html" .. it should point to the php.ini file. So something like: SetEnv PHPRC "/home/bellg980/public_html/php.ini" but probably not a good idea to have in your public_html directory since everyone would be able to see it. Also when setting values in a php.ini file, you don't need to have single/double quotes. (For most values) See this link for more info on PHPRC: http://webmaster.iu.edu/upgrade/phprc.phtml Edited May 6, 2014 by Don E Link to comment Share on other sites More sharing options...
justsomeguy Posted May 6, 2014 Share Posted May 6, 2014 It sounds to me like your host is pretty clueless. From this page: SetEnv PHPRC only works when using PHP as CGI, not when using php as an Apache ModuleFrom your phpinfo page: Server API Apache 2.0 HandlerYou are not running PHP as CGI, it is using the Apache handler. What you're trying to do won't work. That's why your phpinfo page shows this: Scan this dir for additional .ini files (none)Additional .ini files parsed (none)You might be able to make the change you need inside the .htaccess file, although usually PHP_INI_SYSTEM options cannot be changed there. I guess it's worth a try, though. Try adding one of these to your .htaccess file:php_admin_value upload_tmp_dir /home/bellg980/public_html/tmp1php_value upload_tmp_dir /home/bellg980/public_html/tmp1Make sure the path to the directory is correct. If that works, then move your tmp directory out of public_html if you can.Make sure you also set the permissions on your tmp directory so that everyone can read and write there. Link to comment Share on other sites More sharing options...
BigShieldsy Posted May 6, 2014 Author Share Posted May 6, 2014 Hey guys sorry for the late replyI have made the changes suggested by both of you's and after adding php_admin_value to the .htaccess file my site has since went down and produces this error: Internal Server ErrorThe server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@bellgroveafc.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request. This error is now throughout the website. Link to comment Share on other sites More sharing options...
justsomeguy Posted May 6, 2014 Share Posted May 6, 2014 It didn't like the line in .htaccess. Try it with php_value instead of php_admin_value and see if that makes a difference. If not, then PHP might not be loaded as an Apache module. Link to comment Share on other sites More sharing options...
BigShieldsy Posted May 6, 2014 Author Share Posted May 6, 2014 hey JustI tried that other option and yet i am still getting the same error moving file.. sooo annoying now lol Link to comment Share on other sites More sharing options...
justsomeguy Posted May 6, 2014 Share Posted May 6, 2014 You mean you added the php_value option and the page shows up, but has the same behavior? Is the upload_tmp_dir setting in phpinfo still the same? Link to comment Share on other sites More sharing options...
BigShieldsy Posted May 7, 2014 Author Share Posted May 7, 2014 (edited) yes. i am still getting the same problem.The phpinfo page can be found at www.bellgroveafc.com/phpinfo.phpI have also found a folder called php at the location of /home/bellg980/ is there any possibility of making the changes in there at all? as all the folders appear to be empty. Edited May 7, 2014 by BigShieldsy Link to comment Share on other sites More sharing options...
justsomeguy Posted May 7, 2014 Share Posted May 7, 2014 The phpinfo page still says it is not looking anywhere else for additional ini files, so that's the problem. Adding the PHPRC variable to .htaccess did not work, probably because it is not running as a CGI module. You'll need to go back to your host and ask for step-by-step instructions that you can follow to set this up, because it looks like they are telling you to do something that will not work on their server. You might also want to just consider a different host, I haven't heard of problems like this with shared hosting. I don't trust that they really know what they're doing. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now