I see a lot of speculation and opinion in this thread and not a lot of actual information.
What are your environment details? (see Admin panel -> Dashboard -> Information)
What are you actually getting for an error when you try?
How are you trying to create the ticket with the attachment?
(I would guess you wrote a custom script to try to use the API to open a ticket, but the answer might be both.)
If you are using a script to access the API to open a ticket what language did you use?
What are your PHP.ini file size settings?
upload_max_filesize
post_max_size
max_file_uploads
After you changed these settings did you restart your webserver?
What type of file are you trying to attach and upload?
Are you trying to upload something as a User or as an Agent?
If a User what do you have set here:
Admin panel -> Settings -> Tickets
Scroll down to the bottom of the page:
Click on Config

What do you have here?

You can also make sure that
If an Agent what do you have set here:
Admin panel -> Settings -> System
Scroll down to the bottom of the page.
