VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Virtuemart 1.1 Development (Archiv) => Quality & Testing VirtueMart 1.1.x => Topic started by: mtk on January 14, 2008, 12:53:05 PM

Title: Strange J!1.5 Warning
Post by: mtk on January 14, 2008, 12:53:05 PM
I'm having a strange J!1.5 warning, which I only have with an online installation.
(I have uploaded my offline, XAMPP, files & DB)

The warning appears only when I'm in option=com_virtuemart (both legacy ON or OFF)
[cdoe]
Warning: mysql_real_escape_string() expects parameter 2 to be resource, integer given in .../libraries/joomla/database/database/mysql.php on line 193

Title: Re: Strange J!1.5 Warning
Post by: mtk on January 14, 2008, 12:59:13 PM
Sorry, here are my details:


Database Version:    5.0.37-standard
Database Collation: utf8_general_ci
PHP Version: 4.4.7
Web Server: Apache/1.3.39 (Unix) mod_ssl/2.8.30 OpenSSL/0.9.8b PHP/4.4.7 mod_perl/1.29 FrontPage/5.0.2.2510

Joomla: Latest SVN
VM: Nightly Build 1157
Title: Re: Strange J!1.5 Warning
Post by: jenkinhill on January 14, 2008, 13:44:21 PM
Same as http://forum.virtuemart.net/index.php?topic=35393.0

Seems to be php4 related
Title: Re: Strange J!1.5 Warning
Post by: mtk on January 14, 2008, 13:48:41 PM
I happened only recently when upgrading to latest VM version...
Title: Re: Strange J!1.5 Warning
Post by: mtk on January 15, 2008, 00:11:32 AM
I've echoed the input for the 'getEscapde' function on line 191:
function getEscaped( $text, $extra = false )
Text = 0
Resource = 62
the number 62 is obviously not an object... :)

The question is, who & when calls this function, so I could back-trace it some more...
Title: Re: Strange J!1.5 Warning
Post by: mtk on January 15, 2008, 00:47:54 AM
I just found out, it happens only when site is OFFLINE...
Title: Re: Strange J!1.5 Warning
Post by: aravot on January 15, 2008, 08:01:34 AM
That info is helpful now do you mean site is offline or VM (shop) is offline
Title: Re: Strange J!1.5 Warning
Post by: mtk on January 15, 2008, 10:34:12 AM
Quote from: mtk on January 15, 2008, 00:47:54 AM
site is OFFLINE...
Site, as I said... ;)
Title: Re: Strange J!1.5 Warning
Post by: aravot on January 15, 2008, 20:00:25 PM
Need to make sure  ;)

I couldn't replicate, like jenkinhill said it could be php4 issue which I don't have, hopefully someone with php4 can verify this.
Title: Re: Strange J!1.5 Warning
Post by: mtk on January 15, 2008, 21:29:50 PM
Actually I think latest SVN changes did the trick, cause I can{t see the warning again...
Title: Re: Strange J!1.5 Warning
Post by: aravot on January 15, 2008, 21:35:58 PM
In that case I mark this resolved, if the error occurs just reply to this post.
Title: Re: [RESOLVED] Strange J!1.5 Warning
Post by: mtk on January 16, 2008, 03:23:32 AM
Warning is back again, on VM:1167
Title: Re: Strange J!1.5 Warning
Post by: greyroo on January 17, 2008, 06:52:05 AM
I have the same error displayed at the top of the admin pages. Any Ideas

Warning: mysql_real_escape_string() expects parameter 2 to be resource, integer given in /home/hsphere/local/home/inov8/inov8design.info/libraries/joomla/database/database/mysql.php on line 190

 
PHP 4.4.7
Database 4.0.27
Joomla 1.5RC4
VM 1.1 Nightly Build Complete Package (downloaded 17/1/2008)
web server Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7c FrontPage/5.0.2.2635 PHP/4.4.7 mod_throttle/3.1.2


Cheers
Allan
Title: Re: Strange J!1.5 Warning
Post by: Michael Thomsen on January 21, 2008, 02:18:24 AM
Update: just tried today's build: VirtueMart 1.1 Nightly Build [20080121]. Now getting the following warning:
Warning: zip_entry_read() [function.zip-entry-read]: The bytes parameter must greater then zero in /home2/anchorh/public_html/solarenergydirectnew/libraries/joomla/filesystem/archive/zip.php on line 239

same problem here with:
VirtueMart 1.1 Nightly Build [20080119].
joomla 1.5  RC4
Php 5.2.1
MySQL version     5.0.27-standard
Apache version     1.3.37 (Unix)

cheers
Michael
Title: Re: Strange J!1.5 Warning
Post by: aravot on January 23, 2008, 00:59:54 AM
I can not replicate this tried all combinations.

Site Offline /VM online
Site online /VM offline
Site Offline /VM offline
Title: Re: Strange J!1.5 Warning
Post by: mtk on January 23, 2008, 01:09:12 AM
the offline/online does not affect this any more.

it seem like a PHP4 bug (as said by jenkinhill)
Title: Re: Strange J!1.5 Warning
Post by: Michael Thomsen on January 23, 2008, 01:24:09 AM
Dear aravot
thank you very much for helping.
I have now moved on to joomla 1.5 stable and latest nightly build VM 1.1
I have nothing else installed apart from a few fronetend templates.

When installing VM I get the message:
Warning: mysql_real_escape_string() expects parameter 2 to be resource, integer given in /home2/anchorh/public_html/solarenergydirectnew/libraries/joomla/database/database/mysql.php on line 193

I noticed that the files had not been unpacked in administrator/component/virtumemart and in components/virtuemart
so I unpacked those via cpanel filemanager.

Uploaded the modules and plugins manually.

Now all files are in their right places, yet I am still getting the same error line.
I am not the only one: http://forum.virtuemart.net/index.php?topic=35685.0

thank you for looking at this
Michael
Title: Re: Strange J!1.5 Warning
Post by: aravot on January 23, 2008, 04:41:33 AM
What is your php version and could you please send me your SQL error log, if you are on shared hosting you should contact you host to get it.