Jump to content

iNealec

New Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by iNealec

  1. I have also just found an error_log file containing this if it helps. [12-Mar-2014 18:07:18 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0 [12-Mar-2014 18:07:18 UTC] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0 [12-Mar-2014 18:07:18 UTC] PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(GeneratedBundles/20140312180718/bundles/): failed to open dir: No such file or directory' in /public_html/myserver.com/RandIconBase/merge.php:13 Stack trace: #0 /public_html/myserver.com/RandIconBase/merge.php(13): RecursiveDirectoryIterator->__construct('GeneratedBundle...') #1 {main} thrown in /public_html/myserver.com/RandIconBase/merge.php on line 13
  2. I have a php script that works fine on my PC from wampserver but when I uploaded it and ran from my web server I get this error. Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(GeneratedBundles/20140312173738/bundles/): failed to open dir: No such file or directory' in /public_html/myserver.com/RandIconBase/merge.php:13 Stack trace: #0 /public_html/myserver.com/RandIconBase/merge.php(13): RecursiveDirectoryIterator->__construct('GeneratedBundle...') #1 {main} thrown in/public_html/myserver.com/RandIconBase/merge.php on line 13 Here is the code... <?php $baseType = "PresetBases/Pastel"; $rootpath = 'bundles/'; $date = date('YmdHis'); mkdir('GeneratedBundles/'.$date, 0700); $zip = new ZipArchive; if ($zip->open('Bundles.zip') === TRUE) { $zip->extractTo('GeneratedBundles/'.$date.'/'); $zip->close(); } $fileinfos = new RecursiveIteratorIterator( new RecursiveDirectoryIterator('GeneratedBundles/'.$date.'/'.$rootpath)); foreach($fileinfos as $pathname => $fileinfo) { if (!$fileinfo->isFile()) continue; $file = new SplFileInfo($pathname); $ext = $file->getExtension(); if ($ext == 'png'){ $glyph = imagecreatefrompng($pathname); list($gw, $gh) = getimagesize($fileinfo); if($gw==120){ $baseimg = rand(1,17); $filename = $baseType.'/'.$baseimg.'.png'; $heightWidth = 120; list($width, $height) = getimagesize($filename); $newwidth = $heightWidth; $newheight = $heightWidth; $thumb = imagecreatetruecolor($newwidth, $newheight); $source = imagecreatefrompng($filename); imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); $img = imagecopy($thumb, $glyph, 0, 0, 0, 0, 120, 120); imagepng($thumb, $pathname); imagedestroy($thumb); imagedestroy($glyph); } else if ($gw == 152){ $baseimg = rand(1,17); $filename = $baseType.'/'.$baseimg.'.png'; $heightWidth = 152; list($width, $height) = getimagesize($filename); $newwidth = $heightWidth; $newheight = $heightWidth; $thumb = imagecreatetruecolor($newwidth, $newheight); $source = imagecreatefrompng($filename); imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); $img = imagecopy($thumb, $glyph, 0, 0, 0, 0, 152, 152); imagepng($thumb, $pathname); imagedestroy($thumb); imagedestroy($glyph); } } } header( 'Location: archive.php?folder='.$date ) ; ?>
  3. How can i get all the item titles, descriptions & links from http://feeds.bbci.co.uk/news/rss.xml. I managed it with php but I need to use client side scripting. Desired output would be something like this: <a href="link"> <span class="item-title">title</span <span class="item-description">description</span> </a> <a href="link"> <span class="item-title">title</span <span class="item-description">description</span> </a> <a href="link"> <span class="item-title">title</span <span class="item-description">description</span> </a> Thanks in advance for any help.
  4. $createuserfile = $_GET['userID']."-file.txt"; echo $_GET['userID']; <-- This works, but the file created below gets named -file.txt $ourFileHandle = fopen($createuserfile, 'w') or die("can't open file"); fclose($ourFileHandle); $user = new Some_Class(); class Some_Class { public $userfile; function __construct() { $this->userfile = $_GET['userID']."-file.txt"; }
  5. Doesn't seem to be working, there's no more syntax errors but it does no get the value of $_GET. Trying to use it like this: $filename = $_GET['value']."-file.txt"; But the file just comes out: -file.txt
  6. I am working with a php class which contains public variables like so: public $var = "sometext"; <-- This works But when I try to assign an $_GET['value'] to that variable, dreamweaver is saying there is a syntax error. public $var = $_GET['value']; <-- this doesn't work Is there a way around this problem?
  7. To be honest I haven't tried anything, after searching google I knew that I was going to need GD Library but realised I was out of my depth when I went to the website for it. Was hoping for a place to start.
  8. Hi I need a way to merge multiple images together into a new image and save it, there are 4 layers and 2 of them will always be the same, the other 2 will be uploaded images. Layer 1 img (Base layer - Uploaded) Layer 2 img (Doesn't change) Layer 3 img (Uploaded) Layer 4 img (Doesn't change) The image dimensions will always be the same but I need to set each layers x&y position. Can anybody help me?
×
×
  • 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.