Jump to content

foxclone

Members
  • Posts

    107
  • Joined

  • Last visited

Everything posted by foxclone

  1. I was checking the apache error log. When I checked the foxclone error log, I found this: Here's what I have in that section of code: <?php $php_scripts = '../../php/'; require $php_scripts . 'PDO_Connection_Select.php'; require $php_scripts . 'GetUserIpAddr.php'; The $php_scripts points to a php directory one level above public_html/
  2. I just checked permissions. They are okay. OOPs...found a file in root group, changed it to my group. Now getting a http 500 error. BTW - I don't have a .htaccess file on my local server.
  3. @kicken - When I ran 'sudo apachectl configtest' I got a warning as follows: AH00112: Warning: DocumentRoot [/var/www/html] does not exist. Doc Root is declared in the config file I posted. There were no errors shown in the error log.
  4. I'm getting a "Forbidden You don't have permission to access this resource." on my local Apache2 server. Here's my foxclone.conf <VirtualHost *:80> ServerAdmin webmaster@localhost ServerName foxclone ServerAlias foxclone DocumentRoot /var/www/foxclone/public_html <Directory /> AllowOverride All </Directory> <Directory /var/www/foxclone/public_html> Options Indexes FollowSymLinks MultiViews AllowOverride all Require all granted </Directory> ErrorLog /var/log/apache2/foxclone-error.log LogLevel error CustomLog /var/log/apache2/foxclone-access.log combined </VirtualHost> It is shown in /etc/hosts as 127.0.0.1 foxclone. I have no idea where to go from here and appreciate any guidance on how to fix this.
  5. @gizmola - I uploaded the actual picture to colormind.io and they came up with a different palette. Which do you think is better, your's or the one derived from the actual photo? Here's what they selected for a palette:
  6. @gizmola - Major changes made to the index.php. See what you think at http://test.foxclone.com. That black line top and bottom looked terrible, so I softened the colors to be more in-line with the new palette.
  7. @gizmola - I've revised the front page. I'd appreciate some feedback before I continue revising the website. URL:http://test.foxclone.com
  8. @kicken - thanks for checking the website. I appreciate your suggestion regarding black bars for header & footer. All pages were put thru validator as they were created. It's possible that changes introduced errors, so I'll put them back through. Again, thanks for the suggestions and for taking the time to look at the website.
  9. Thanks for the feedback. Most of our users are using laptops or desktops, that's why the site wasn't designed for smartphones. The site has been online for about a year, but I'm always looking for ways to improve it. Thanks again for your response.
  10. I'd appreciate it if someone would provide some feedback about my website design. The site in question is https://foxclone.com.
  11. I agree with Barand. Without seeing all the table structures involved, it's impossible to make recommendations. Another question comes to mind. Are there any foreign keys established between the tables involved?
  12. @gizmola - Thanks for the reply and javascript instruction. That was the first time I dealt with js and was able to build that little script that took hours to put together
  13. @requinix - Thanks. Fixed like this: <p id="test"> The Update will be done in <span id="countdowntimer">10 </span> Seconds</p> <script type="text/javascript"> var timeleft = 10; var downloadTimer = setInterval(function() timeleft--; document.getElementById("countdowntimer").textContent = timeleft; if(timeleft <= 0) clearInterval(downloadTimer); if(timeleft == 0) document.getElementById("test").textContent = "Update Complete"; },1000); </script> NOTE: Added second if statement.
  14. @requinix - Thanks for the reply. What I'm trying to change is the text in the <p> section. What you're suggesting puts additional text on the page. I thought of putting that text in a variable and replacing that text at the end of the countdown, but I don't know where to place it initially.
  15. I’m using a timer script that I’d like to change the displayed text when the countdown ends but have no idea how to accomplish it. I’d appreciate any help I can get. Here’s the code I’m using: <p> The Update will be done in <span id="countdowntimer">20 </span> Seconds</p> <script type="text/javascript"> var timeleft = 20; var downloadTimer = setInterval(function(){ timeleft--; document.getElementById("countdowntimer").textContent = timeleft; if(timeleft <= 0) clearInterval(downloadTimer); },1000); </script> Thanks in advance.
  16. Amazingly, it threw no errors. It also wasn't updating the db. It's been corrected.
  17. The section with the headers ending with readfile($filename) is the download code.
  18. I'm using the following code for users to download files from my website. It works fine for files under 50MB, but fails immediately for larger files. Can someone explain why this is happening and how to fix it? Some of the downloadable files are over 800MB, so I need this working. NOTE: No error messages are thrown on large files. <?php error_reporting(E_ALL); ini_set('display_errors', '1'); $php_scripts = '../../php/'; require $php_scripts . 'PDO_Connection_Select.php'; require $php_scripts . 'GetUserIpAddr.php'; $ip = GetUserIpAddr(); if (!$pdo = PDOConnect("foxclone_data")) { echo "unable to connect"; exit; } function mydloader($l_filename=NULL){ if( isset( $l_filename ) ) { $filename = preg_replace("/\s+/u", " ", $l_filename); $ext = pathinfo($filename, PATHINFO_EXTENSION); if ($ext == '.deb') header('Content-Type: octet-stream'); elseif ($ext == '.iso') header('Content-Type: application/x-cd-image'); elseif ($ext =='.gz') header('Content-Type: application/zip'); else header('Content-Type: octet-stream'); header('Content-Description: File Transfer'); header("Content-Disposition: attachment; filename={$filename}"); header('Pragma: public'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($filename)); readfile($filename); // Get lookup id $test = $pdo->query("SELECT lookup.id FROM lookup WHERE inet_aton('$ip') >= lookup.ipstart AND inet_aton('$ip') <= lookup.ipend"); $ref = $test->fetchColumn(); $ref = intval($ref); // Insert record in download table $stmt = $pdo->prepare("INSERT INTO download (`address`, `filename`, `ip_address`, `lookup_id`) VALUES (?, ?, inet_aton('$ip'),?)"); $stmt->execute([$ip, $ext, $ref]) ; } else { echo "isset failed"; } } mydloader($_GET["f"]); Thanks in advance
  19. All problems fixed. Thanks to everyone who replied.
  20. The rest of the code is solely for inserting a record into the database table, but I'll include it here. <?php function mydloader($filename=NULL) { if( isset( $filename ) ) { $ext = pathinfo($filename, PATHINFO_EXTENSION); { if ($ext == '.iso') header('Content-Type: application/x-cd-image'); elseif ($ext =='.gz') header('Content-Type: application/zip'); else header('Content-Type: octet-stream'); } header('Content-Length: ' .filesize($filename)); header("Content-Disposition: attachment; filename={$filename}"); header('Pragma: no-cache'); header('Expires: 0'); readfile($filename); $php_scripts = "https://foxclone.com/php/"; require $php_scripts.'PDO_Connection_Select.php'; require $php_scripts.'GetUserIpAddr.php'; $ip = GetUserIpAddr(); if (!$pdo = PDOConnect("foxclone_data")) { exit; } $test = $pdo->query("SELECT lookup.id FROM lookup WHERE inet_aton('$ip') >= lookup.ipstart AND inet_aton('$ip') <= lookup.ipend"); $ref = $test->fetchColumn(); $ref = intval($ref); $ext = pathinfo($l_filename, PATHINFO_EXTENSION); $stmt = $pdo->prepare("INSERT INTO download (`address`, `filename`,`ip_address`, `lookup_id`) VALUES (?, ?, inet_aton('$ip'),?)"); $stmt->execute([$ip, $ext,$ref]) ; } else { echo "isset failed"; } } mydloader($_GET["f"]);
  21. @kicken - I've been looking at this code since last Friday. I think I need to take a few days away from this project so I'm not seeing "What should be" instead of "What is".
  22. @kicken - I just rechecked the code; no var_dumps.
  23. @kicken - I did that and when i go diff original download, it just scrolls up my screen. here are the size difference: original size: 5674712 download size: 5674783 I've compared the files in Meld and it appears that the filename is being pre-pended to the downloaded file: 00000000: 7374 7269 6e67 2832 3029 2022 666f 7863 string(20) "foxc 00000010: 6c6f 6e65 3530 5f61 6d64 3634 2e64 6562 lone50_amd64.deb 00000020: 220a 213c 6172 6368 3e0a 6465 6269 616e "
  24. @kicken - That didn't tell us anything at all: larry@t430:~/Downloads$ diff /var/www/foxclone/public_html/download/foxclone50_amd64.deb /home/larry/Downloads/foxclone50_amd64.deb Binary files /var/www/foxclone/public_html/download/foxclone50_amd64.deb and /home/larry/Downloads/foxclone50_amd64.deb differ They are different in the hex editors. Original file shows: Signed 32 bit as: 1769108595 Downloaded file shows: Signed 32 bit as: 1751347809 Question for you: could that preg_replace() in the code be causing this issue?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.