News:

Support the VirtueMart project and become a member

Main Menu

[FIXED] MySQL warning 1155 on J1.5 with PHP4

Started by jenkinhill, January 13, 2008, 13:27:37 PM

Previous topic - Next topic

jenkinhill

Error message appears on loading of admin panel:

Warning: mysql_real_escape_string() expects parameter 2 to be resource, integer given in /var/www/html/joomla3/libraries/joomla/database/database/mysql.php on line 193

Database Version: 4.1.22
PHP Version:      4.4.4
Web Server: Apache
VirtueMart 1.1: Ver. 1155
Joomla! Version: Joomla! 1.5 Beta4+ Rev 9909 2008-01-08

No error message with PHP 5.2.4

[attachment cleanup by admin]
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

jenkinhill

Still get the same error message with VM1175 - now on J1.5 final.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum


jenkinhill

Only happens with PHP4 for me. A ggogle on the error throws up a lot of similar warnings on a variety of sites.

This one is interesting - but not helpful:  http://forum.joomla.org/index.php/topic,215561.0.html
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Michael Thomsen

#4
this is the same problem I am having on a server with this configuration:

UPDATE: the configuration below is from the cpanel, however when checking the PHP version from within the Joomla admin panel it states the PHP version to be  4.4.6, so perhaps it is just a PHP 4 related problem.


Operating system     Linux
Kernel version    2.6.9-55.0.9.ELsmp
Machine Type    i686
Apache version    1.3.37 (Unix)
PERL version    5.8.7
PHP version    5.2.1
MySQL version    5.0.27-standard

cheers
Michael

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

rrommel

I also got the same error with a new site I'm working on (joomla 1.5 stable = vm 1.1 beta 1185)

My isp have both php 4 and php5 installed on their server. Get this error because php4 is used in default. Solved the problem by adding: "SetEnv DEFAULT_PHP_VERSION 5 " in.htaccess

MoonWizard

Using joomla 1.5 stable = vm 1.1 beta 1186 and still can see the error:

Warning: mysql_real_escape_string() expects parameter 2 to be resource, integer given in /home/hblincom/public_html/*****/libraries/joomla/database/database/mysql.php on line 193

Fresh install.

By the way, I have written into my htaccess "SetEnv DEFAULT_PHP_VERSION 5" and I haven't noticed any change.

It's a bit confusing to have the virtuemart admin menu like a list...

Just trying to help, really nice work.

gregdev

I can see it on PHP4. I'll look at it (unless someone else gets to it first).

Greg

[tr][td]
[/td][td]
www.plainlycode.com[/td][/tr]
[/table]

jenkinhill

Quote from: MoonWizard on January 25, 2008, 02:08:41 AM
It's a bit confusing to have the virtuemart admin menu like a list..

CHMOD the VM component files, back and frontend to 644 - with current compilations the files will have 777 permissions. That fixes the list type menu and allows me to run VM, as my server security will not allow PHP files to run if they are set to 777.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

MoonWizard

Thank you Kelvyn, I have noticed this subject has been solved here: http://forum.virtuemart.net/index.php?topic=35395.0

By the way... now this admin area ROCKS!!!!

Just returning to the previous problem, I still can see the

Warning: mysql_real_escape_string() expects parameter 2 to be resource, integer given in /home/hblincom/public_html/hbeuropa/libraries/joomla/database/database/mysql.php on line 193

After the change.

Just trying to help... my knowledge of programming is limted.

Thanks for this great great component :-)

Quote from: jenkinhill on January 25, 2008, 10:25:46 AM
Quote from: MoonWizard on January 25, 2008, 02:08:41 AM
It's a bit confusing to have the virtuemart admin menu like a list..

CHMOD the VM component files, back and frontend to 644 - with current compilations the files will have 777 permissions. That fixes the list type menu and allows me to run VM, as my server security will not allow PHP files to run if they are set to 777.

rrommel

#11
Hi Moonwizard,

I think you should check which php version is installed on your server. If your server has both php 4 and php 5 installed like mine than you can add "SetEnv DEFAULT_PHP_VERSION 5 " in .htaccess
If your server only has php4 than adding this line will not solved your problem.

Quote
Re: MySQL warning 1155 on J1.5 with PHP4
« Reply #10 on: Today at 11:16:37 »
   Reply with quote
Thank you Kelvyn, I have noticed this subject has been solved here: http://forum.virtuemart.net/index.php?topic=35395.0

By the way... now this admin area ROCKS!!!!

Just returning to the previous problem, I still can see the

Warning: mysql_real_escape_string() expects parameter 2 to be resource, integer given in /home/hblincom/public_html/hbeuropa/libraries/joomla/database/database/mysql.php on line 193

I didn't see this warning again after adding this line in .htaccess (it's the first line in my .htaccess)


MoonWizard

I have a fresh install of Joomla 1.5 stable, and I host my website in Hostgator (php 4 and 5 available).

I have removed last version and installed the new one: the 1189 version.

With PHP version: 4.4.4, I still can see the warning message:

Warning: mysql_real_escape_string() expects parameter 2 to be resource, integer given in /home/*****/public_html/*****/libraries/joomla/database/database/mysql.php on line 193

And I can't see the virtuemart admin area correctly (still the list).



Then I have added to my .htaccess the next line for changing php version:
AddHandler application/x-httpd-php5 .php

And now the problem has disappeared and the admin section looks great!

Is there any problem running the site in this version?

Thank you very much!

aravot

The following error is still present in VM 1.1 rev 1189 when legacy plugin if off/unpublished, publishing legacy plugin the error goes away.

QuoteWarning: mysql_real_escape_string() expects parameter 2 to be resource, integer given in /home/example.com/public_html/libraries/joomla/database/database/mysql.php on line 193

Tested server info:
PHP Built on: Linux pollux.lunarmania.com 2.6.9-55.0.12.ELsmp #1 SMP Fri Nov 2 11:19:08 EDT 2007 i686
Database Version: 5.0.27-standard
Database Collation: utf8_general_ci
PHP Version: 4.4.7
Web Server: Apache/1.3.39 (Unix) Sun-ONE-ASP/4.0.2 mod_fastcgi/2.4.6 mod_log_bytes/1.2 mod_bwlimited/1.4 mod_auth_passthrough/1.8 FrontPage/5.0.2.2635 mod_ssl/2.8.30 OpenSSL/0.9.7a
Web Server to PHP interface: cgi
Joomla! Version: Joomla! 1.5.0 Production/Stable
User Agent: Opera/9.25 (Windows NT 5.1; U; en)