Jump to content

Search the Community

Showing results for tags 'php'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General Discussion
    • Website Management and Coding
    • Technology and the Internet
    • Philosophy, Politics, and Science
    • Art and Entertainment
    • Other Discussion
  • HelioHost
    • Questions
    • Customer Service
    • How You Can Help
  • HelioNet
    • News
    • Contact HelioNet

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL







  1. Hi, is it possible to add PHP 7.4 to Tommy? Thanks
  2. I installed a php script on my site but this was not found so I can install this"GD functions are needed to process images, please ensure your PHP install is compiled with GD enabled.Freetype (in GD) is required to use ttf fonts within images. " Any solution? email: bielsilva1cba@gmail.com
  3. Hi I use PHP framework http://seerio.us/w/doku.php It has an error: Warning: system() has been disabled for security reasons in /path_to_public_html_dir/az/server/php/generator.php on line 32 Because, it can't to call php command. How can i manage this?
  4. Hello can you please enable intl extension on php 7.3 ?
  5. how to enable php errors in johnny server pls i have check many things but cant find the right soluton anyone can help me ! pls i know about error_logs but i dont want that
  6. Hi I can't run php in a html file on johhny. What do I need to do?
  7. Hello again, I've got a problem with PHP GD. The problem is I'm trying to draw charts (i.e.Bar) and I'm trying to draw the Bell Curve of a data or an array with "Normal Distribution", but the problem is the chart is not fitting inside the allocated image size (1920 x 1080) so the chart is exceeding the boundaries of the image. So I've just tried a library "JpGraph" it works very well but doesn't fit my requirements, so I saw that the library is using some kind of canvas to draw the chart and then merging the image with the original one and I'm trying to do the same but I couldn't understand how. Please help me out, it's very urgent, I've to finish the project within a week. public function histogram(array $samples, int $bins, string $heading = null, string $xAxisHeading = null, string $yAxisHeading = null) { if(is_array($samples)) { $data = $_bins = $this->calculateBins($samples, $bins); /* * Chart settings and create image */ // Margin between label and axis $labelMargin = 8; $count = count($samples); // Max value on y-axis $yMaxValue = max(array_column($data, 'count')); if($yMaxValue % 2 == 1) $yMaxValue++; // Distance between grid lines on y-axis $yLabelSpan = ceil($yMaxValue / $bins); $t1 = ($yLabelSpan * $bins); if($t1 > $yMaxValue) $yMaxValue = $t1; // Bar and line width $lineWidth = 1; $barWidth = 20; // Image dimensions $imageWidthActual = round(count($data) * $barWidth * ($labelMargin / 2)); $imageHeightActual = round((count($data) / 2) * $count / 2); $imageWidth = min(1920, $imageWidthActual); $imageHeight = min(1024, $imageHeightActual); // Grid dimensions and placement within image $gridTop = 40; $gridBottom = round(($imageHeight - $gridTop)); $gridLeft = 50; $gridRight = round(($imageWidth - $gridLeft)); $gridHeight = $gridBottom - $gridTop; $gridWidth = $gridRight - $gridLeft; // Bar space $barSpacing = $gridWidth / count($data); // Font settings $font = PHPML_ROOT.'assets/fonts/OpenSans-Regular.ttf'; $headingFont = PHPML_ROOT.'assets/fonts/OpenSans-Bold.ttf'; $fontSize = 10; $headingFontSize = 12; // Init image $chart = imagecreatetruecolor($imageWidth, $imageHeight); // Setup colors $backgroundColor = imagecolorallocate($chart, 255, 255, 255); $headingColor = imagecolorallocate($chart, 0, 0, 0); $axisColor = imagecolorallocate($chart, 85, 85, 85); $gridColor = imagecolorallocate($chart, 212, 212, 212); //$barColor = imagecolorallocate($chart, 47, 133, 217); $labelColor = $axisColor; imagefill($chart, 0, 0, $backgroundColor); imagesetthickness($chart, $lineWidth); /* * Print grid lines bottom up and Y-Labels */ for($i = 0; $i <= $yMaxValue; $i += $yLabelSpan) { $y = $gridBottom - $i * $gridHeight / $yMaxValue; // draw the line imageline($chart, $gridLeft, $y, $gridRight, $y, $gridColor); // draw right aligned label $labelBox = imagettfbbox($fontSize, 0, $font, strval($i)); $labelWidth = $labelBox[4] - $labelBox[0]; $labelX = $gridLeft - $labelWidth - $labelMargin; $labelY = $y + $fontSize / 2; imagettftext($chart, $fontSize, 0, $labelX, $labelY, $labelColor, $font, strval($i)); } /* * Draw x- and y-axis */ imageline($chart, $gridLeft, $gridTop, $gridLeft, $gridBottom, $axisColor); //Left //imageline($chart, $gridRight, $gridTop, $gridRight, $gridBottom, $axisColor); //Right //imageline($chart, $gridLeft, $gridTop, $gridRight, $gridTop, $axisColor); //Top imageline($chart, $gridLeft, $gridBottom, $gridRight, $gridBottom, $axisColor); //Bottom $headingBox = $this->getTextBoundingBox($chart, $headingFontSize, $headingFont, strval($heading), 0); $xAxisHeadingBox = $this->getTextBoundingBox($chart, $fontSize, $font, strval($xAxisHeading), 0); $yAxisHeadingBox = $this->getTextBoundingBox($chart, $fontSize, $font, strval($yAxisHeading), 90); if(!empty($heading)) imagettftext($chart, $headingFontSize, 0, $headingBox['x']['center'], $headingBox['y']['top'], $headingColor, $headingFont, $heading); if(!empty($xAxisHeading)) imagettftext($chart, $fontSize, 0, $xAxisHeadingBox['x']['center'], $xAxisHeadingBox['y']['bottom'], $headingColor, $font, $xAxisHeading); if(!empty($yAxisHeading)) imagettftext($chart, $fontSize, 90, $yAxisHeadingBox['x']['left'], $yAxisHeadingBox['y']['middle'], $headingColor, $font, $yAxisHeading); /* * Draw the bars with X-labels */ $itemX = $gridLeft + $barSpacing / 2; $canvasWidth = ($imageWidth * 2); $canvasHeight = ($imageHeight * 2); $canvas = imagecreatetruecolor($canvasWidth, $canvasHeight); $canvasBackgroundColor = imagecolorallocate($canvas, 255, 255, 255); $labelColor = imagecolorallocate($canvas, 85, 85, 85); $barColor = imagecolorallocate($canvas, 47, 133, 217); imagefill($canvas, 0, 0, $canvasBackgroundColor); foreach($data as $key => $bin) { // Draw the label $labelBox = imagettfbbox($fontSize, 0, $font, $key); $labelWidth = $labelBox[4] - $labelBox[0]; $labelX = $itemX - $labelWidth / 2; $labelY = $gridBottom + $labelMargin + $fontSize; imagettftext($canvas, $fontSize, 0, $labelX, $labelY, $labelColor, $font, $key); foreach($bin as $k=>$value) { // Draw the bar $x1 = $itemX - $barWidth / 2; $y1 = $gridBottom - $value / $yMaxValue * $gridHeight; $x2 = $itemX + $barWidth / 2; $y2 = $gridBottom - 1; imagefilledrectangle($canvas, $x1, $y1, $x2, $y2, $barColor); } $itemX += $barSpacing; } $resized = $this->resize($canvas, $imageWidth, $imageHeight); imagealphablending($canvas, false); imagesavealpha($canvas, true); //imagecopyresampled($chart, $canvas, 0, 0, 0, 0, $canvasWidth, $canvasHeight, $imageWidth, $imageHeight); imagecopymerge($chart, $resized, 0, 0, 0, 0, $canvasWidth, $canvasHeight, 100); //imagecopyresized($chart, $canvas, 10, 10, 0, 0, $canvasWidth, $canvasHeight, $imageWidth, $imageHeight); /* * Output image to browser */ //header('Content-Type: image/png'); ob_start(); imagepng($chart); $outBlob = ob_get_contents(); ob_end_clean(); imagedestroy($canvas); imagedestroy($chart); $outImg = "data: image/png;base64,".base64_encode($outBlob); /* * Output image to file */ //imagepng($chart, 'chart.png'); return $outImg; } return false; }
  8. Php extension sodium: As of PHP 7.2.0 this extension is bundled with PHP So i can ask, how can i activate that. Im running php 7.2.30 version, but i can't use that.
  9. Hi, I am using following function to get online users count. But it appears that there is no permission for reading content of that dir. Can you help me please? Server: tommy function onlineUsers() { $i = 0; $path = session_save_path(); if (trim($path)=="") { return FALSE; } $d = dir($path); while (false !== ($entry = $d->read())) { if ($entry!="." and $entry!="..") { if (time()- filemtime($path."/$entry") < 1 * 60) { $i++; } } } $d->close(); return $i; }
  10. Hi, I just transferred my local files to the server. But it seems my sessions are not working. But all of them work fine in the localhost. So, I'm sure the code works fine. But only problem is that those working sessions are not working in the server. Event the header('location: ../index.php'); didn't work please help me. Thanks.
  11. Hi, there. I'd like to know if it's possible to use a chat system here (PHP, JS, Websocket). I have a chat system made in php and integrated with a socket by using JS, and in localhost, everytime I want to use it, I have to start the server first using the command below in terminal: php.exe websocket_server.php Is there any way of doing this here? If so, what are the procedures? How do I do this here? Thank you!
  12. Hi guys, I want to setup a typo3 webpage on my account. When using softaculous Apps installer to install typo3 it shows an error: Required PHP extension not found : soap Could you please enable the php soap extension on tommy? My username is frischid. Thank you very much. Edit: I'm currently running php7.2
  13. I am getting a "Fatal error: Class 'PDO' not found" where I was not previously. I had recently moved some code around, but after restoring it I'm still getting this error. Is there some trick to pointing to the extension properly. The line causing the fault is: $dbh = new PDO('sqlite:'.$db_name); The php.ini in my root folder has extension = sqlite3.soextension = pdo_sqlite.so phpinfo has PDO drivers mysql, pgsql, sqlite
  14. Hi, I've just managed to setup Joomla, but soon I redirected to control panel, I received error notification like: should I simply ignoring it? TIA
  15. Hello everyone! PHP sessions don't seem to be working. After a few searches, I checked /tmp disk usage and still have plenty of space. I wrote a class, which I use in other projects and I am 99% sure is working. Also checked the logs but there is no error related to sessions. What could be causing this? Thanks in advance! Julio.
  16. Hi, could you install Imagick extension on PHP 7.3 on Tommy? Thanks
  17. Hello. I am on the Johnny server for my site, and i am trying to install MediaWiki. However, it says this. The following errors were found : Required PHP extension not found: iconvI looked it up, and iconv is supposed to be enabled by default, so I don't know why its disabled or not there. Requesting it to have it be put back. EDIT: Fixed it, i changed to a newer version of PHP (i was on 7.2) and now it installed correctly. Lock this thread or something, or delete it.
  18. I want to set my php limits to the following bellow: max_execution_time upload_max_filesize post_max_size memory_limit i need help. thanks.
  19. I am trying to install Hubzilla Server on my account and it's spitting out three critical errors (exec disabled, shell_exec disabled, and could not find a command) that I can't get past. Now, before you reply, I understand why you would not want shell_exec and exec enabled. I am not a PHP programmer by any means, but I understand the potential security concern here. So, now, my question: Hubzilla is pretty feature rich and decentralized. The decentralized aspect is what I was looking for. Is there another decentralized social network, even one not offered through the Softaculous easy installer, that would not require shell_exec and exec enabled?
  20. Is it possible to create a database through MySQL commands using PHP here? Look at this situation: I want the clients to create a database with the click of a button, containing several preset tables, using SQL commands inside PDOs in PHP. That being said, I want those databases to be created automatically, because this is part of a customized simple application.
  21. I created a test.php file to see if it's enabled, but i alays get an "Internal Server Error" and i also checked the permission tp 644. I created a new folder and inserted the php file ith the same permission and there i get "Forbidden You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe". Then i inserted a plain php echo in html, but the code gets commented out. How do i know that PHP is enabled and can vie php files?
  22. [03-Feb-2020 08:47:33 UTC] PHP Fatal error: Uncaught Error: Class 'CPANEL' not found in /home/*********/public_html/index.php:2Stack trace:#0 {main} thrown in /home/****/public_html/index.php on line 2
  23. Hello I'm using helio host server for backend to my app today my app doesnt work and all php file not working and my website use low bandwdith and size could you please fix this probelm Thank you update site back online again I'm happy I'll put helio host banner ads on my app thank you Helio host
  24. Hi, please help. I can't download files from external url like before. the function file_get_contents() is not working as before, i'm getting the error: "failed to open stream: Connection refused" i understand this could be a firewall block level, so please check it out. Thanks!
  25. Hi. I'd like to know if there is a limit for a php application to upload a file and, if present, if it is customizable. Thank you
  • Create New...