Mambo and G2 embedding
rza
Joined: 2005-05-08
Posts: 34 |
![]() |
has this error been fixed yet? Fatal error: Call to undefined function: getorderby() in /var/www/html/gallery2/modules/core/classes/helpers/GalleryChildEntityHelper_simple.class on line 480 |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
rza, yes it has, but some time ago. i don't know when. grtz, |
|
JackBreech
Joined: 2005-02-24
Posts: 22 |
![]() |
cpzhao!!! That installation seems almost perfect! How did you get it setup? |
|
kdizzle
Joined: 2005-07-06
Posts: 27 |
![]() |
Hello, I have one great looking site until I hit gallery and there are these errors at the top: Warning: Cannot modify header information - headers already sent in /srv/www/htdocs/Mambo/index.php on line 214 Warning: Cannot modify header information - headers already sent in /srv/www/htdocs/Mambo/index.php on line 215 Warning: Cannot modify header information - headers already sent in /srv/www/htdocs/Mambo/index.php on line 216 Warning: Cannot modify header information - headers already sent in /srv/www/htdocs/Mambo/index.php on line 217 Warning: Cannot modify header information - headers already sent in /srv/www/htdocs/Mambo/index.php on line 218 Has this issue been solved? Almost forgot: Gallery version = 2.0-beta-3+ core 0.9.31 |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
kdizzle, no not yet, i'm trying to reproduce on msas, your number 3 to report it. regards, |
|
kdizzle
Joined: 2005-07-06
Posts: 27 |
![]() |
Thank you, I sent you a pm with my site and user info just in case. I don't know if this helps or not, but all the modules work with gallery2 except the SWmenu free. On the gallery component I can see the title of the SWmenuFree block but I can't see any menu choices. This happens only on the gallery component. |
|
kdizzle
Joined: 2005-07-06
Posts: 27 |
![]() |
Okay, I looked around on mamboserver and found this thread (and a few like it). This basicaly says there is a blank line or space outside of the <?php........?> tags. So I figure it isn't in the mambo directory sice I only get the errors: Warning: Cannot modify header information - headers already sent in /srv/www/htdocs/Mambo/index.php on line 214 Warning: Cannot modify header information - headers already sent in /srv/www/htdocs/Mambo/index.php on line 215 Warning: Cannot modify header information - headers already sent in /srv/www/htdocs/Mambo/index.php on line 216 Warning: Cannot modify header information - headers already sent in /srv/www/htdocs/Mambo/index.php on line 217 Warning: Cannot modify header information - headers already sent in /srv/www/htdocs/Mambo/index.php on line 218 WHEN I use the gallery component. I ssh in and open the component directory and find: I then open gallery2.php and find it appears all goobltygooked up. I see characters I have never seen using vim before. The file appears to all be on one line with no breaks at all. So I ftp the gallery2.php file back to my home computer and open it with notepad.....same thing it appears to have no structure other than it is all on one line. Obviously the component works so it makes me think the garbeled file has a space causing the error. Could somebody post a clan version of the gallery2.php file so I can try to use it? Michiel let me know if I am way off and I'll stop. |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
kdizzle, Hi, i'll look if i can some how change this setting to use common returns when saving insteas of the apple's returns. Regards, |
|
kdizzle
Joined: 2005-07-06
Posts: 27 |
![]() |
The ssh progarm I use is putty. |
|
volksman
Joined: 2005-07-22
Posts: 12 |
![]() |
I see the same things in my copy. Basically ^M characters all over the place. I used dos2unix to convert them but the problem persists. |
|
kdizzle
Joined: 2005-07-06
Posts: 27 |
![]() |
I was hoping this was it but I haven't got it yet. I ftp'ed the 4 files to my local machine and opened them in word pad and they looked fine. I opend the com_gallery2 directory and rm all the files. What has me stumped is the error appears to be in the index.php but it only happens when I use the gallery component. |
|
volksman
Joined: 2005-07-22
Posts: 12 |
![]() |
I'm pretty sure it is that gallery is sending header info and so is mambo.....only problem is I'm too new to PHP to understand how to fix it.... |
|
tassos
Joined: 2005-07-22
Posts: 4 |
![]() |
The issue with the ^M can easily be solved if you filter the files with the utility mac2unix that should be available on most Linux installations. This is because the files seem to stem from a Mac environment. The newline convention is different in Unix/WinDos/Mac. But this will not solve you the problem with the "Warning: Cannot modify header information ..." This must originalte in the fact that both Mambo and Gallery send page header information and PHP does not like that. This warning appears frequenty in various php related developments and the cause could be the one described in http://de.php.net/header |
|
phpsurf
Joined: 2005-07-24
Posts: 1 |
![]() |
Hi guys, I'm new to Mambo, so I'm not sure of the impacts of this. The problem I found comes from Mambo : Mambo sends its own headers after calling the embedded component. Have a look at the file index.php at the root of your Mambo installation. header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); header( 'Cache-Control: post-check=0, pre-check=0', false ); header( 'Pragma: no-cache' ); sould be sent before the block that is just before, between lines 177 and 190 : ob_start(); if ($path = $mainframe->getPath( 'front' )) { $task = mosGetParam( $_REQUEST, 'task', '' ); $ret = mosMenuCheck( $Itemid, $option, $task, $gid ); if ($ret) { require_once( $path ); } else { mosNotAuth(); } } else { echo _NOT_EXIST; } $_MOS_OPTION['buffer'] = ob_get_contents(); ob_end_clean();
Hope this will help. |
|
jeff260z
![]()
Joined: 2005-07-20
Posts: 26 |
![]() |
I'm having the same header warnings. Warning: Cannot modify header information - headers already sent in /usr/local/psa/home/vhosts/mysite/httpdocs/index.php on line 194 Warning: Cannot modify header information - headers already sent in /usr/local/psa/home/vhosts/mysite/httpdocs/index.php on line 195 Warning: Cannot modify header information - headers already sent in /usr/local/psa/home/vhosts/mysite/httpdocs/index.php on line 196 Warning: Cannot modify header information - headers already sent in /usr/local/psa/home/vhosts/mysite/httpdocs/index.php on line 197 Warning: Cannot modify header information - headers already sent in /usr/local/psa/home/vhosts/mysite/httpdocs/index.php on line 198 |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
jeff260z, phpsurf, kdizzle, is there a line with "output started at ..." with these warnings? please post this also? Only in embedded or also in standalone? regards, |
|
tassos
Joined: 2005-07-22
Posts: 4 |
![]() |
Displaying such warnings depends on the setting of the display_errors switch in your php.ini file. Especially on production sites (hosted web-spaces) this is likely to be "Off". Only if this is "On" such warning will go through. May I ask those of you that use the gallery2 component for mambo and have not these problems to check the settings of the display_errors switch? Regards, |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
tassos, i have full report on, and i don't recieve the warnings. regards, |
|
kdizzle
Joined: 2005-07-06
Posts: 27 |
![]() |
My php.ini says: Still getting the errors. |
|
kdizzle
Joined: 2005-07-06
Posts: 27 |
![]() |
michiel_1981 wrote:
jeff260z, phpsurf, kdizzle, No Quote:
please post this also? Only in embedded or also in standalone? I only receive the errors in embed mode and only when the gallery 2 componnent. |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
Hi, the people with the header problem, do you have gzip enabled or not? regards, |
|
kdizzle
Joined: 2005-07-06
Posts: 27 |
![]() |
I do not have gzip enabled. |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
kdizzle, could you try it with gzip enabled. regards, |
|
kdizzle
Joined: 2005-07-06
Posts: 27 |
![]() |
I tried it both ways. I just did s cvs update to: Gallery version = 2.0-beta-4 core 0.9.32 PHP version = 4.3.10 apache2handler Webserver = Apache/2.0.53 (Linux/SUSE) Database = mysql 4.1.10a Toolkits = ArchiveUpload, Exif, Gd, ImageMagick, NetPBM, Thumbnail Operating system = Linux apbio 2.6.11.4-21.7-default #1 Thu Jun 2 14:23:14 UTC 2005 x86_64 Browser = Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4 When I turn on maximum error reporting I get the in the component Notice: Undefined index: id.rootAlbum in /srv/www/htdocs/Mambo/components/com_gallery2/userfuncs.php on line 343 In the random image module I get this Notice: Use of undefined constant randomImage - assumed 'randomImage' in /srv/www/htdocs/Mambo/modules/mod_gallery_block.php on line 48 I have no idea if these errors mean anything I am just trying to be thorough in my explanation. The only other strange thing is the way that the module " SWmenuFree" does not appear when the gellery2 com is in use. I can see the title of the block but none of the menus. edit **I just noticed I mentioned the menu issue before.** |
|
malthazor
Joined: 2003-04-03
Posts: 33 |
![]() |
I tried turning on gzip with no change. Only see errors when embedded, standalone works fine. Quote:
Gallery version = 2.0-beta-4 core 0.9.32 Interesting we are both running SuSE, wonder if others with the header issue are too? |
|
volksman
Joined: 2005-07-22
Posts: 12 |
![]() |
nope...I'm on Slackware 10.1 and I get the issue. I also have gzip enabled. I got rid of the error by setting display_errors = Off in php.ini and restarting apache but I know that the error is still there and that isn't a permanent fix.... |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
volksman, i know that volksman, i'm working on it, but my best gues at the moment is that there is being a file included containing white spaces outside <?php ?> markers. regards, [edit] |
|
jeff260z
![]()
Joined: 2005-07-20
Posts: 26 |
![]() |
There are no other lines of code displayed. These are the only lines shown. This only happens with the componant displayed. Things work correctly otherwise. It's just that this code is displayed in the mambo header when accessing the componant. |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
People with the header problem, could you replace the header lines in index.php in the mambo root directory with these lines, and see what happens. If any info is put out at the top of your page, copy/paste it here please! after you have don this remove the "else" rule and you won't be heaving these errors any more. this isn't a permanent fix, but i like to now what is already sent and where it's coming from, thxs if (!headers_sent()){ header( 'Expires: Mon, 26 Jul 1997 05:00:00 GMT' ); header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' ); header( 'Cache-Control: no-store, no-cache, must-revalidate' ); header( 'Cache-Control: post-check=0, pre-check=0', false ); header( 'Pragma: no-cache' ); } else { print_r(apache_response_headers()); }
regards, |
|
malthazor
Joined: 2003-04-03
Posts: 33 |
![]() |
I made the change and the only line I get is: Quote:
Array ( [X-Powered-By] => PHP/4.3.4 [Transfer-Encoding] => chunked [Content-Type] => text/html; charset=UTF-8 ) |
|
blisswhisper
Joined: 2005-07-04
Posts: 3 |
![]() |
I did the header replacement, and instead of the "headers already sent" messages I got this at the top of the page: Array ( [X-Powered-By] => PHP/4.3.10 [Keep-Alive] => timeout=15, max=100 [Connection] => Keep-Alive [Transfer-Encoding] => chunked [Content-Type] => text/html; charset=UTF-8 ) I also did a complete re-install of the latest snapshot and component just to make sure it wasn't some glitch with upgrading and still have the header problem. |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
blisswhisper, the only one i can think of that belongs to gallery2 and his component is " text/html charset=UTF-8" the rest isn't set by gallery2 or his component! strange thing, waiting for other to report. regards, |
|
kdizzle
Joined: 2005-07-06
Posts: 27 |
![]() |
Here is mine: Array ( [X-Powered-By] => PHP/4.3.10 [Expires] => Thu, 19 Nov 1981 08:52:00 GMT [Cache-Control] => private [Pragma] => no-cache [Keep-Alive] => timeout=15, max=100 [Connection] => Keep-Alive [Transfer-Encoding] => chunked [Content-Type] => text/html; charset=UTF-8 ) Thanks michiel. |
|
buffman
Joined: 2005-07-18
Posts: 9 |
![]() |
I'm having the exact same problem as kdizzle. Here is mine:
Thanks! Let me know if I can provide any other info. |
|
rfloyd
Joined: 2004-08-31
Posts: 7 |
![]() |
Same problem here.
Need anything else? |
|
artemido
![]()
Joined: 2005-02-08
Posts: 24 |
![]() |
you can fix this with a simple perl command (dos2unix won't fix the problem because as opposed to having a carriage return + a line feed (the former of which would be removed by dos2unix) the scripts simply has a carriage return...). Keep in mind that _all_ of the files have this problem. (yay for someone doing their coding in notepad for mac or something!) Anyway, here's how you fix it if you're running a *ux* OS: perl -e "s/\r/\n/g;" -pi < filename > Fixing this will not remedy the header error (still seeing that), but it will make it easier to hack around in the code... :D kdizzle wrote:
Okay, I looked around on mamboserver and found this thread (and a few like it). |
|
artemido
![]()
Joined: 2005-02-08
Posts: 24 |
![]() |
same problem with the header messages, but when I add the code suggested to my mamboroot index.php, I get an error: The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- Invalid at the top level of the document. Error processing resource 'http://www.ramzvents.com/index.php?option=com_gallery2... Array ^ |
|
buffman
Joined: 2005-07-18
Posts: 9 |
![]() |
Thanks Artemido! I was wondering about the PHP format anomalies myself. After running your perl command I was able to see it in a much more readable format. =) I was able to fix my problems with the random image block and gallery component by simply commenting out the IF statements where the error messages stated. I'm pretty much clueless when it comes to PHP, but commenting out those lines doesnt' seem to affect the functionality. I no longer have error messages and everything seems to be working fine. If anyone needs help or have questions what I did let me know. You can also view my 'working' Mambo/Gallery integration at http://tkeeler.webhop.net Thanks for all your help guys! p.s. - I wasn't getting the 'cannot modify header information' error message so I'm not sure if this will/wont work for you! |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
buffman, what error where you having and what did you fix, please report this to me or post it here, so i can see if i can put it in the next version, so other can directly benefit from this, thxs and regards, |
|
buffman
Joined: 2005-07-18
Posts: 9 |
![]() |
Hi Michiel! I was getting 2 different errors: This one was on the random image block:
and this one I was getting when I browsed images through the gallery component:
When I didn't see a solution in this forum, I went looking through the code to see what I could do. The formatting for the files was all wierd (it looked like it was on 1 single line) so I used artemido's perl command tip to reformat the files:
This didnt' fix the problem but did let me see the code better. I started hacking around - i'm totally clueless when it comes to PHP. This is just a workaround and I wouldn't call it a fix. Here's the code I commented out: For the random image block error I commented this out in userfuncs.php: //if($block == randomImage OR $block == recentImage OR $block == viewedImage OR $block == dailyImage OR $block == weeklyImage OR $block == monthlyImage OR $block == specificItem){ //$css = $itemframe; //} else { //$css = $albumframe; //} and for the gallery component I commented this out in mod_gallery.block.php: // if($g2_Config['id.rootAlbum'] != $item->getId()){ // $mainframe->AppendPathway($path); // } I have no clue what they do, but it didn't seem to break anything and made the error messages go away. Maybe you could explain to us what they do and what it might break? Thanks a million for creating these modules and components - they're great! Let me know if you have any questions! p.s. - How did you get the gallery2 stats module on your dev site? |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
Bug is fixed, correct code shown below!
try resaving your config, do you use a different DB for mambo and gallery2? if($block == 'randomImage' OR $block == 'recentImage' OR $block == 'viewedImage' OR $block == 'dailyImage' OR $block == 'weeklyImage' OR $block == 'monthlyImage' OR $block == 'specificItem'){ $css = $itemframe; } else { $css = $albumframe; } is the correct code regards, |
|
jeff260z
![]()
Joined: 2005-07-20
Posts: 26 |
![]() |
I get these warnings; Warning: Cannot modify header information - headers already sent in /usr/local/psa/home/vhosts/atlanticz.ca/httpdocs/index.php on line 194 Warning: Cannot modify header information - headers already sent in /usr/local/psa/home/vhosts/atlanticz.ca/httpdocs/index.php on line 195 Warning: Cannot modify header information - headers already sent in /usr/local/psa/home/vhosts/atlanticz.ca/httpdocs/index.php on line 196 Warning: Cannot modify header information - headers already sent in /usr/local/psa/home/vhosts/atlanticz.ca/httpdocs/index.php on line 197 Warning: Cannot modify header information - headers already sent in /usr/local/psa/home/vhosts/atlanticz.ca/httpdocs/index.php on line 198 This is my system info: Gallery version = 2.0-beta-4 core 0.9.32 |
|
crusinone
Joined: 2005-07-31
Posts: 1 |
![]() |
ok this is what i did to fix the header problem per the earlier header post move th 4 header lines 194-198 in mambo's index.php to 178 just before the other block he mentioned . This worked and resolved the error for me and so far its not having any negitive side effects on any other mambo modules/components . The only problem i am still having is with the album component, its not pointing to the base one , its pointing to one of the sub albums, i have to click on its parent to get access to the others under the mambo administrator album management component |
|
jeff260z
![]()
Joined: 2005-07-20
Posts: 26 |
![]() |
michiel_1981 wrote:
Michiel when you say bug is fixed do you mean the header problem? Also which file do I modify? Do I modify line 77 of file mod_gallery_block.php with this code Notice: Undefined index: id.rootAlbum in /srv/www/htdocs/Mambo/components/com_gallery2/userfuncs.php on line 401 ? |
|
jeff260z
![]()
Joined: 2005-07-20
Posts: 26 |
![]() |
crusinone I moved the header lines in the mambo index.php file and the errors are gone. Things seem to work fine but what else could this potentially do? Security issues? |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
jeff260z, the "Notice: Use of undefined constant randomImage " is fixed the "id.rootAlbum " i asked you if you installed your gallery2 on a different database? header, bug is known but i haven't found made fix yet. regards, |
|
buffman
Joined: 2005-07-18
Posts: 9 |
![]() |
Hi Michiel - the bug fix worked, thanks! As far as the 'Undefined index: id.rootAlbum' error - I resaved the config but still get that error message. Yes, I am using a different database - gallery2 and mambo - both mysql databases. Is this not allowed? Would I be better off using the same database? michiel_1981 wrote:
|
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
buffman, i haven't fixed the 2 database install, i'm working on it. regards, |
|
michiel_1981
Joined: 2005-05-19
Posts: 430 |
![]() |
buffman, in the userfuncs.php if($g2_Config['databasequel']!=1){ $gallery2_db = new database( $g2_Config['hostname'], $g2_Config['username'], $g2_Config['password'], $g2_Config['database'], $g2_Config['tablePrefix'] ); $query = 'SELECT '.$g2_Config['columnPrefix'].'parameterName, '.$g2_Config['columnPrefix'].'parameterValue' . ' FROM '.$g2_Config['tablePrefix'].'PluginParameterMap' . ' WHERE '.$g2_Config['columnPrefix'].'pluginType = \'module\'' . " AND $sql"; $gallery2_db->setQuery( $query ); $data = $gallery2_db->query(); } else { global $database; $query = 'SELECT '.$g2_Config['columnPrefix'].'parameterName, '.$g2_Config['columnPrefix'].'parameterValue' . ' FROM '.$g2_Config['tablePrefix'].'PluginParameterMap' . ' WHERE '.$g2_Config['columnPrefix'].'pluginType =\'module\'' . " AND $sql"; $database->setQuery( $query ); $data = $database->query(); } this the newest version, and includes connection for second database, replace the code with the one above and try saving again. Check if the error is gone. regards, |
|
jhvl
Joined: 2005-08-01
Posts: 2 |
![]() |
I have the last version of Gallery2 integrated with mambo 4.5.2 using the gallery2 component (2.06) and everything works just great. I have added the gallery2 random image block module and it also works fine, but it creates problem with the text display in Mambo (in news or elsewhere) : all the accentuated characters (my site is in french) disappear and are replaced with question marks. If I remove the image block module everything goes back to normal. Could not find a solution to this in the forum. Has anybody a clue about what the problem could be ? regards |
|