Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > MISCELLANEOUS > Archives > Bug Report 1.4.x

Thread Closed
 
Thread Tools
  #1  
Old 04-14-2005, 01:36 PM
tark Offline
forum loafer
 
Join Date: Apr 2005
Location: Czech Republic :-)
Posts: 8
Send a message via ICQ to tark
MySQL 4.1

Hi!
Please, have Pixelpost support for MySQL 4.1 or only MySQL 4.0? I use MySQL 4.1 and Pixelpost doesn't work. (

BTW, I can't speak English... This is only example of English. ;-)
__________________
Miroslav Navratil
My items are only experiments of English, I learn English. :-D
http://kanevinternetu.blacksuns.net/fotoblog.php - my photoblog :-)
  #2  
Old 04-14-2005, 01:39 PM
Connie
Guest
 
Posts: n/a
Well, MySQL 4.1 should work, I have no other information

what is not working?
can you connect to the database?
can you upload images?
are thumbnails created?
is the first page empty after uploading images?

please give more correct information, we will try to understand

good luck, Connie
  #3  
Old 04-14-2005, 02:46 PM
tark Offline
forum loafer
 
Join Date: Apr 2005
Location: Czech Republic :-)
Posts: 8
Send a message via ICQ to tark
Quote:
Originally Posted by Connie
what is not working?
can you connect to the database?
can you upload images?
are thumbnails created?
is the first page empty after uploading images?
ad 1) system haven't got a mysqli functions ... MySQL 4.1 use different functions.

MySQL 3.23, 4.0 : mysql_select_db(parametrs...)
MySQL 4.1 : mysqli_select db(parametrs, different list parametrs)

ad 2,3,4) no, system doesn't work

I recommended database layer. Example:

Code:
$VersionDatabase = 2; // MySQL 4.0 = 1 || MySQL 4.1 = 2

if($VersionDatabase == 1) {
  function sql_connect(parameters..) {
    return mysql_select_db(parameters...);
  }
}
else {
  function sql_connect(parameters..) {
    return mysqli_select_db(parameters...);
  }
}
I try add like DB layer, but fail it.
__________________
Miroslav Navratil
My items are only experiments of English, I learn English. :-D
http://kanevinternetu.blacksuns.net/fotoblog.php - my photoblog :-)
  #4  
Old 04-14-2005, 03:19 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
change mysql_select_db functions
inside admin/install.php and admin/upgradefrom14beta.php to
mysqli_select db

I don't think that is the problem with MYSQL 4.1. That is actually your PHP version that makes things strange. I think you use "PHP 5 CVS". mysql_select_db () should work in php version 3/4/5 but mysqli_select_db() is only available in PHP 5 CVS.
Pixelpost is running right now on MYSQL version 4.1 with a PHP vesrion 4.3.11 in our demo
http://www.blinking8s.com/temp/dev/p....php?view=info
login with user/pass : admin/admin. Everything's OK!
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
  #5  
Old 04-14-2005, 03:34 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
I made changes to make it compatible to MYSQL version 4.1 and 5.x
I don't have those versions here. try it and tell me
http://www.raminia.com/temp/pixelpost_1.4.zip
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
  #6  
Old 04-14-2005, 03:50 PM
tark Offline
forum loafer
 
Join Date: Apr 2005
Location: Czech Republic :-)
Posts: 8
Send a message via ICQ to tark
Quote:
Originally Posted by raminia
I made changes to make it compatible to MYSQL version 4.1 and 5.x
I don't have those versions here. try it and tell me
http://www.raminia.com/temp/pixelpost_1.4.zip
Don't work. Call to undefined function mysql_ ...
__________________
Miroslav Navratil
My items are only experiments of English, I learn English. :-D
http://kanevinternetu.blacksuns.net/fotoblog.php - my photoblog :-)
  #7  
Old 04-14-2005, 03:52 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
at which line?
where was the error? tell me complete!
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
  #8  
Old 04-14-2005, 04:08 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
do you have PHP 5 ?
I think so! I changed the file I provided before. download it again and tell me what happend.

changed function
Code:
function start_mysql()
{
	global $pixelpost_db_host, $pixelpost_db_user, $pixelpost_db_pass, $pixelpost_db_pixelpost;
	mysql_connect($pixelpost_db_host, $pixelpost_db_user, $pixelpost_db_pass) || die("Error: ". mysql_error());
	$mysql_version = mysql_get_server_info();
	if ((substr($mysql_version,0,3)=="4.1" || substr($mysql_version,0,2)=="5.")& substr(phpversion(),0,1)=="5")
	{
	  // MYSQL 4.1.x OR 5.x
		mysqli_select_db($pixelpost_db_pixelpost) || die("Error: ". mysql_error());
		}
	else
	{ // MYSQL 4.0.x
		mysql_select_db($pixelpost_db_pixelpost) || die("Error: ". mysql_error());
		}
}
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
  #9  
Old 04-14-2005, 04:18 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
if it did not work again use
Code:
function start_mysql() 
{ 
   global $pixelpost_db_host, $pixelpost_db_user, $pixelpost_db_pass, $pixelpost_db_pixelpost; 
   mysql_connect($pixelpost_db_host, $pixelpost_db_user, $pixelpost_db_pass) || die("Error: ". mysql_error()); 
   $mysql_version = mysql_get_server_info(); 
   if (substr($mysql_version,0,3)=="4.1" || substr($mysql_version,0,2)=="5.") 
   { 
     // MYSQL 4.1.x OR 5.x 
      mysqli_select_db($pixelpost_db_pixelpost) || die("Error: ". mysql_error()); 
      } 
   else 
   { // MYSQL 4.0.x 
      mysql_select_db($pixelpost_db_pixelpost) || die("Error: ". mysql_error()); 
      } 
}
and if it did not work again check your php and mysql versions again. the function mysql_select_db is supported in PHP 3,4,5 but mysqli_select_db is only supported in PHP 5 CVS !!
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
  #10  
Old 04-14-2005, 04:35 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
Like raminia said: problem is with PHP5 not with MySQL.

Some time ago (near half a year) I was fighting with PHP5 and MySQL 4.1x and I lost :/
Maybe try to add to your http server info that *.php should be handled by PHP4, not PHP5?

I've got next idea - maybe we should use ADODB interface to DB?? I could make PP DB server independent (if we add correct SQL for the most popular of them).
__________________
photoblog | portfolio | addons | Donate
Thread Closed


Thread Tools




All times are GMT. The time now is 03:26 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs