Admin Menu Items Missing

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
titleistfour
Posts: 8
Joined: Sun Aug 03, 2003 3:29 pm

Admin Menu Items Missing

Post by titleistfour »

Hello,
I'd like to say that phpmyfaq is great! I currently have a development box with it running. My problem is that when I tried to move it to its production home, I'm seeing some items missing in the Admin Menu Section. Specifically, Create Record, Backup and Export your FAQ are just not showing up, they are blank. This is on an Itanium2 system running RedHat Advanced Workstation 2.1 with php 4.1.2, apache 1.3.27 and mysql 3.23.56.

Has anyone seen this oddity before? Is this a misconfiguration? or bug? Thanks for any help!
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

please post your system configuration which is shown at the start page in the admin section.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
titleistfour
Posts: 8
Joined: Sun Aug 03, 2003 3:29 pm

Post by titleistfour »

System Information
phpMyFAQ Version phpMyFAQ 1.3.3
Server Software Apache/1.3.27 (Unix) (Red-Hat/Linux) PHP/4.1.2
PHP Version PHP 4.1.2
PHP Memory Limit
Register Globals off
Safe Mode off
MySQL Version MySQL 3.23.56
Webserver Interface APACHE

I just noticed that the PHP Memory Limit is blank. That is also sort of odd as well. Thanks
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

this is strange, maybe this is a problem with PHP and Itanium. Is it possible for you to update your PHP to version 4.3.2?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
titleistfour
Posts: 8
Joined: Sun Aug 03, 2003 3:29 pm

Post by titleistfour »

Well, I suppose I could. However, I just tried it on my machine at home, and it does the same thing. And this machine is RedHat 9.

phpMyFAQ Version phpMyFAQ 1.3.4
Server Software Apache/2.0.40 (Red Hat Linux)
PHP Version PHP 4.2.2
PHP Memory Limit 8M
Register Globals off
Safe Mode off
MySQL Version MySQL 3.23.56
Webserver Interface APACHE2FILTER

I see those same 3 menu items blank. Why would those items be blank and not all of them? Sees quite odd to me, not sure where to even begin looking.
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

do you see the records in your FAQ? Do you see them in a tool like phpMyAdmin?

There are some known issues with Red Hat 9, PHP 4.2.2 and Apache 2.0.40 are working not really well together.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
titleistfour
Posts: 8
Joined: Sun Aug 03, 2003 3:29 pm

Post by titleistfour »

Well, this is a new install, so there are no records. And since the "Create Records" item is not there, I can't make any. I was going to import my database, but that menu item is missing as well. :) I tried do import from the command line using the dump file, but got some errors.

Looking at the php code, its just a simple print statement to display those menu items, so its pretty crazy that its not working.
titleistfour
Posts: 8
Joined: Sun Aug 03, 2003 3:29 pm

Post by titleistfour »

Oh! I just figured it out!

in admin/menue.php, line 39

<?php print $arrow."\"".$menue; ?>&aktion=editentry"><? print $ad_entry_add ?></a></td>

I changed it to

<?php print $arrow."\"".$menue; ?>&aktion=editentry"><?php print $ad_entry_add ?></a></td>

and it worked! Lines 87 and 91 are the same way. On those machines that it was not working, my php was setup to not allow short_open_tags. So, that seems to be the problem. Perhaps you could fix that in the next release? Thanks for the help
titleistfour
Posts: 8
Joined: Sun Aug 03, 2003 3:29 pm

Post by titleistfour »

I found some more of these in the following files:

admin/backup.main.php line 48
admin/record.delquestion.php line 45
admin/config.edit.php line 24
admin/stat.browser.php line 44
admin/user.edit.php line 72

a simple grep "<? " * found those. Don't seem to see anymore anywhere else though. Hope this helps.
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

thanks, I'll fix this.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Arent
Posts: 1
Joined: Thu Sep 04, 2003 8:45 pm

php short_open_tag

Post by Arent »

Thanks for your great PHP-script!

Probably this is common knowledge, but this problem is indeed caused by the "short open tag" <? like titleistfour found out. There is a setting for this in the php.ini: short_open_tag = Off (or On). If this setting is OFF in your php.ini the problem is there. If you have access to the php.ini you could set this to ON and the problem will be gone and you don't have to edit the phpMyFaq files. But it is better to leave this setting to OFF, because you could run into conflicts with other scripting languages that use the same short <? tag.

There is a better way to avoid this problem. Just always use the long tag <?php in all your (php-)scripts. If you ALWAYS do that in ALL your php-scripts, it doesn't matter if setting in php.ini is ON or OFF and no one will ever experience the problem.

Sorry if this is common knowledge already, just want to make sure :wink:
Arent
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi Arent,

this is already fixed. The short tags were alive from our first PHP3 release from summer 2001 and they are eliminated now. :)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply