Some users installing osTicket will be experienceing problems in installation - particularly it just doesn't seem to do anything, or there is weird stuff in the fields on the setup page.

The developers have chosen to use PHP ShortTags, which is a non standard way of identifying php code in scripts. The standard way to identify a PHP code block is by using <?php .. ?> tags.

The method being used is <? .. ?>

The primary advantage of short tags is you are able to use <?=$var?> to insert a variable into html code, rather than the longer <?php echo $var; ?>

While this is a shortcut, and maybe slightly easier to read, it makes the php code less portable. ShortTags must be enabled in php.ini to work. Expecting users to change a server setting in order to run the osTicket software is possible damaging the adoption rate of osTicket.

This problem can be fixed - I corrected the short tag issue in the RC6.3 in about 5 minutes.

I would like to suggest that short tags are dropped, and the long hand, but more portable approach is used.

As I said, I was able to correct the issue in just a few minutes, and would happily carry out the same corrections on the latest development code in an effort to make osTicket more portable, and increase the number of users.

From the PHP Manual:

Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags.

I did a grep for "<?=" and can see that it's been used in a lot more files than just the /setup/index.php file (more than 300 lines which was my buffer set to).

It would take more than 5 minutes to change all the files. Perhaps we can volunteer to carry out the change together (I am no expert on osTicket though)?

osTicket uses short tags at the moment, which will change on the next release. A quick fix is to enable short tags via php.ini or by adding .htaccess to osTicket's root directory and enter the following code.

php_value short_tags on

jasonbash: I made the changes on the entire distribution in 5 minutes. I used find replace on all the php files, through PHPed (brilliant PHP Ide btw) and got it done quite quickly, so there wouldn't be any need for tag team so we can make the change.

peter: I understand the server change, but I do not have access to those files in a shared hosting environment. Once the short tags are removed, this is no longer a problem, and more people will easily be able to use osTicket.

Do you have some sort of time line for the next release? Also, as a PHP programmer, is there any thing I can do to help the development of osTicket?

Write a Reply...