Welcome, Guest
Username Password: Remember me

Image resize results in blank page, GD installed
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Image resize results in blank page, GD installed

Image resize results in blank page, GD installed 14 years, 9 months ago #173

Hi guys, found my first issue.

The iPhone template goes blank when 'rescale if bigger' or 'fixed rescale ratio' is selected - all my images are floated either left or right, could this be why? They are transparent GIFs and PNGs.

GD is installed and MJ is on latest version 0.91.

Any idea why this could be and how to get my images resizing? They *could* be JPEGs if this fixes things, its just a cut corner that transparency is used for. Cheers guys

GD extensions: GD
GD::Graph / GD::Graph3d / GD::Graph::Data / GD::Graph::Error / GD::Graph::area / GD::Graph::axestype / GD::Graph::axestype3d / GD::Graph::bars / GD::Graph::bars3d / GD::Graph::colour / GD::Graph::cylinder / GD::Graph::cylinder3d / GD::Graph::hbars / GD::Graph::lines / GD::Graph::lines3d / GD::Graph::linespoints / GD::Graph::mixed / GD::Graph::pie / GD::Graph::pie3d / GD::Graph::points / GD::Graph::utils / GD::Image / GD::Polygon / GD::Polyline / GD::Simple / GD::Text / GD::Text::Align / GD::Text::Wrap

Image resize results in blank page, GD installed 14 years, 2 months ago #2295

I'm having the same problem, but only when I run on my linux host, wich is payd, not free as mentioned in FAQ.

Joomla 1.5.20
Mobile Joomla 0.9.8

My computer: WORKS
Windows 7
imagesstoriesResized folder OK, with images inside

Host: DON'T WORK
Linux
images/stories/Resized folder not created

- Assigned write permissions for all on images and stories, bt the folder is still missing.
- Created manually Resized folder, write permission, nothing yet.

What can I check?

Image resize results in blank page, GD installed 14 years, 2 months ago #2297

Debugging, I found that the error is caused because my web host use PHP 4, and has no support for MySQLi.
I ask to upgrade to MySQL5 and enable MySQLi, but it's not possible. Before we change the host provider, I'll make a question:

There's another way/plugin to resize images? I found this one, and it look so simple:
www.white-hat-web-design.co.uk/articles/php-image-resizing.php

Image resize results in blank page, GD installed 14 years, 2 months ago #2299

I got it working! I've changed Mysqli function calls to Joomla DB API calls.

Example:

File TeraWurflDatabase_MySQL4.php

/**
* Establishes connection to database (does not check for DB sanity)
*/
public function connect(){
$this->numQueries++;
/*
$this->dbcon = new mysqli(TeraWurflConfig::$DB_HOST,TeraWurflConfig::$DB_USER,TeraWurflConfig::$DB_PASS,TeraWurflConfig::$DB_SCHEMA);
if(mysqli_connect_errno()){
$this->errors[]=mysqli_connect_error();
$this->connected = mysqli_connect_errno();
return false;
}
*/

// By Marcos Henke - set/2010
$this->dbcon =& JFactory::getDBO();
$user =& JFactory::getUser();
$aid = $user->get('aid', 0);


$this->connected = true;
return true;
}


(.....)



// Device Table Functions (device,hybrid,patch)
public function getDeviceFromID($wurflID){
$this->numQueries++;
// Marcos Henke - set/2010
//$res = $this->dbcon->query("SELECT * FROM `".TeraWurflConfig::$MERGE."` WHERE `deviceID`=".$this->SQLPrep($wurflID)) or die($this->dbcon->error);
$query = "SELECT * FROM `".TeraWurflConfig::$MERGE."` WHERE `deviceID`=".$this->SQLPrep($wurflID);
$this->dbcon->setQuery($query, 0, 0);
$rows = $this->dbcon->loadObjectList();
if ($rows == FALSE)
//throw new Exception("Tried to lookup an invalid WURFL Device ID: $wurflID");
return null;
$data = $rows[0];

/*
// Marcos Henke - set/2010
if(!is_object ($res) || $res->num_rows == 0){
//$res->close();
throw new Exception("Tried to lookup an invalid WURFL Device ID: $wurflID");
}
$data = $res->fetch_assoc();
$res->close();
return unserialize($data['capabilities']);
*/
return unserialize($data->capabilities);
}


And some other workarounds related to this changes, like affected_rows:
//if($this->dbcon->affected_rows > 0){
if($this->dbcon->getAffectedRows() > 0){


And the most important: the tera* tables were not created durigng installation on my host provider, so I exported them from my dev database to host database.

Image resize results in blank page, GD installed 14 years, 2 months ago #2304

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4867
  • Karma: 105
We had similar idea, but it meets some problems:
1. Connector for MySQL5 can work with MySQLi only as it uses multi_query method that is not part of Joomla DB API.
2. Connector for MySQL4 can be made "joomla-compatible" (as you show above), but TeraWURFL library is changed in each release, so it requires a lot of work to apply all the changes into joomla-connector.
That's why we keep using original TeraWURFL files.
  • Page:
  • 1
Time to create page: 0.13 seconds

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.