mysql_insert_id error?
11 posts
• Page 1 of 2 • 1, 2
mysql_insert_id error?
I receive the following error when I install 1.1 on a fresh Joomla 1.5.2 install:
The error continues to rear its head everywhere I look within the component after installation.
I'm currently using Mosso's Hosting "Cloud". Right now my cluster is configured with Apache/suPHP/MySQL5 using mysqli. FTP is disabled in Joomla and suphp in use to avoid having to set ownership of files to allow the installation of add-ons.
Any and all assistance would be greatly appreciated!
- Code: Select all
Settings table created
Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /mnt/target01/012345/www.my-domain.com/web/content/administrator/components/com_xmap/classes/XmapSitemap.php on line 146
Default Settings inserted
The error continues to rear its head everywhere I look within the component after installation.
I'm currently using Mosso's Hosting "Cloud". Right now my cluster is configured with Apache/suPHP/MySQL5 using mysqli. FTP is disabled in Joomla and suphp in use to avoid having to set ownership of files to allow the installation of add-ons.
Any and all assistance would be greatly appreciated!
- ExypherIT
- Fresh Boarder

- Posts: 2
- Joined: Thu Apr 17, 2008 2:03 am
Re:mysql_insert_id error?
I have exactly the same problem on my clustered hosting with Servage.net.
I hope that you can fix this problem very soon, because for native Joomla 1.5, there is not much out there...
If you can't reproduce this problem, please send me an email and I will install a fresh J1.5 installation on my hosting, so you can test new versions for fixing the problem.
Thanks!
Geert
I hope that you can fix this problem very soon, because for native Joomla 1.5, there is not much out there...
If you can't reproduce this problem, please send me an email and I will install a fresh J1.5 installation on my hosting, so you can test new versions for fixing the problem.
Thanks!
Geert
- altum
- Fresh Boarder

- Posts: 1
- Joined: Fri Apr 18, 2008 5:05 am
Re:mysql_insert_id error?
Anyone?
Anyone in a cluster environment NOT have this problem?
Anyone in a cluster environment NOT have this problem?
- ExypherIT
- Fresh Boarder

- Posts: 2
- Joined: Thu Apr 17, 2008 2:03 am
Re:mysql_insert_id error?
I have received a similar error and my host (netregistry.com.au) is also using load-sharing clusters. I'm running latest stable versions of Joomla 1.5 and Xmap.
Upon installation, I received the following error (note path is santitised with *** for privacy):
Subsequently, whenever I call the module, I receive a stack of errors thus :
and
I don't know if it's relevant, but I wonder if this has something to do with the path to the SQL Database. On our server, due to the load-balancing it is not stored on Localhost and I couldn't find anywhere to configure the database address.
Upon installation, I received the following error (note path is santitised with *** for privacy):
Warning: mysql_insert_id(): supplied argument is not a valid MySQL-Link resource in /clientdata/clients/*/*/**[ourdomain]**/www/administrator/components/com_xmap/classes/XmapSitemap.php on line 146
Subsequently, whenever I call the module, I receive a stack of errors thus :
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /clientdata/clients/*/*/*[ourdomain]*/www/administrator/components/com_xmap/classes/XmapSitemap.php on line 74
and
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /clientdata/clients/*/*/*[ourdomain]*/www/administrator/components/com_xmap/classes/XmapSitemap.php on line 74
I don't know if it's relevant, but I wonder if this has something to do with the path to the SQL Database. On our server, due to the load-balancing it is not stored on Localhost and I couldn't find anywhere to configure the database address.
Last edited by lewko on Thu Jan 01, 1970 12:00 am, edited 65535 times in total.
Reason: 1
Reason: 1
- lewko
- Fresh Boarder

- Posts: 4
- Joined: Sun Apr 27, 2008 5:14 am
Re:mysql_insert_id error?
Hi!
Had the same problem on 1.5.2 (updated recently to 1.5.3) the bug continued so I tried to fix it (because I really need a sitemap).
So I searched the code and the problem was because I was using mysqli (improved mysql for php).
So I extracted the zip file (com_xmap-1.1_for_Joomla_1.5.zip) and opened the com_xmap/classes/XmapSitemap.php file and changed this lines (diff code):
Then I ziped the folder and installed it normally and it worked... no more errors/warnings.
My host is also using load-sharing clusters, but I don't think that was the problem.
I hope this will help you and good luck to all.
BTW thanks for this joomla component!
Had the same problem on 1.5.2 (updated recently to 1.5.3) the bug continued so I tried to fix it (because I really need a sitemap).
So I searched the code and the problem was because I was using mysqli (improved mysql for php).
So I extracted the zip file (com_xmap-1.1_for_Joomla_1.5.zip) and opened the com_xmap/classes/XmapSitemap.php file and changed this lines (diff code):
- Code: Select all
70d69
< $db = & JFactory::getDBO();
75c74
< $lines[] = $db->getEscaped($menutype).','.intval($menu->ordering).','.$show.','.$showXML.','.$db->getEscaped($menu->priority).','.$db->getEscaped($menu->changefreq);
---
> $lines[] = mysql_real_escape_string($menutype).','.intval($menu->ordering).','.$show.','.$showXML.','.mysql_real_escape_string($menu->priority).','.mysql_real_escape_string($menu->changefreq);
147c146
< $this->id = $db->insertid();
---
> $this->id = mysql_insert_id( $db->_resource );
Then I ziped the folder and installed it normally and it worked... no more errors/warnings.
My host is also using load-sharing clusters, but I don't think that was the problem.
I hope this will help you and good luck to all.
BTW thanks for this joomla component!
- alias.mac
- Fresh Boarder

- Posts: 4
- Joined: Sun May 04, 2008 5:33 pm
Re:mysql_insert_id error?
Sorry. I have no idea how to decipher your diff code.
Any chance you could paste a simple how-to version for us beginners?
Any chance you could paste a simple how-to version for us beginners?
- lewko
- Fresh Boarder

- Posts: 4
- Joined: Sun Apr 27, 2008 5:14 am
Re:mysql_insert_id error?
Sure!
Sorry about that... I'll upload the file for you.
Just overwrite the file that is on the zip with this one on com_xmap/classes folder, then make a zip file with all the files and upload the zip you've just created. And that's all.
I hope this will help you!
Good luck.
Well... I can't upload php files... I'll have to tell you the lines then:
on line 70 add this:
$db = & JFactory::getDBO();
on line 75 (previous 74) change it to look like:
$lines[] = $db->getEscaped($menutype).','.intval($menu->ordering).','.$show.','.$showXML.','.$db->getEscaped($menu->priority).','.$db->getEscaped($menu->changefreq);
on line 147 (previous 146) change it to look like:
$this->id = $db->insertid();
That's all feedback if any trouble
Sorry about that... I'll upload the file for you.
Just overwrite the file that is on the zip with this one on com_xmap/classes folder, then make a zip file with all the files and upload the zip you've just created. And that's all.
I hope this will help you!
Good luck.
Well... I can't upload php files... I'll have to tell you the lines then:
on line 70 add this:
$db = & JFactory::getDBO();
on line 75 (previous 74) change it to look like:
$lines[] = $db->getEscaped($menutype).','.intval($menu->ordering).','.$show.','.$showXML.','.$db->getEscaped($menu->priority).','.$db->getEscaped($menu->changefreq);
on line 147 (previous 146) change it to look like:
$this->id = $db->insertid();
That's all feedback if any trouble
Last edited by alias.mac on Thu Jan 01, 1970 12:00 am, edited 65535 times in total.
Reason: 1
Reason: 1
- alias.mac
- Fresh Boarder

- Posts: 4
- Joined: Sun May 04, 2008 5:33 pm
Re:mysql_insert_id error?
It seems to work :woohoo:
The error messages have gone and for the first time, I can produce a functioning sitemap.
I'll check it over the next week to see how it performs and whether the clustering introduces any issues, however I'm very happy.
Well done!
The error messages have gone and for the first time, I can produce a functioning sitemap.
I'll check it over the next week to see how it performs and whether the clustering introduces any issues, however I'm very happy.
Well done!
- lewko
- Fresh Boarder

- Posts: 4
- Joined: Sun Apr 27, 2008 5:14 am
Re:mysql_insert_id error?
no prob! ;)
- alias.mac
- Fresh Boarder

- Posts: 4
- Joined: Sun May 04, 2008 5:33 pm
Re:mysql_insert_id error?
Thanks alias.mac! I'll update the package with your fix!
Thank you again!
Thank you again!
-

guilleva - Administrator

- Posts: 1517
- Joined: Wed Sep 12, 2007 3:10 am
- Location: San José, Costa Rica
11 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: Bing [Bot] and 3 guests