An open source web application meant to help manage & create invoices in a simple, straightforward way.

Small issue upgrading PHP to 5.3

Although we are still in beta version, as we said over and over again, there are people who have installed Siwapp on their own server. If you’re one of those people, intrepid adventurer, and you have decided to try luck with the latest version of PHP (5.3), you can suddenly get a 500 error when trying to access the application.

It is not my intention to enter into boring technical details, but think it is necessary a brief explanation. When you log into the application, it performs some checks for recurring invoices. These verifications are associated with other checks in the customers table that should have no effect in normal conditions.

Each customer is associated with an internal name that is generated from its own name. The programming associated with that task has not changed, but behaves differently in PHP5.2 and PHP 5.3: before accented vowels were removed, now they are replaced by non-accented vowels. Therefore, a customer whose name is “Fundación ABC” (“ABC Foundation”), in PHP 5.2 had an internal name such as “fundacinabc” but in PHP 5.3, the generated internal name is “fundacionabc”. As the internal name is used to decide if we create a new customer object, it is possible that a customer created in the old environment appear as nonexistent in the new environment, and the application will try to create it again as a new customer, producing the error.

Well, at the end it has not been such a short explanation.


If your customers do not have names with accented vowels or non US characters you probably will have no problem. If you get that error you can do one of these things:

  1. If you installed from a package downloaded from the web or you installed through subversion and you are in a tag (RELEASE_0_3_…), apply this patch.
  2. If you use subversion and you are in /trunk just update.
  3. Wait to 0.4 version.

In UNIX system you can apply the patch (assuming you copied and uncompressed it to the root of your install) doing:

cd /path/to/siwapp
patch -p0 -i rebuildSlugsTask.diff

It will patch a file and create another one.

In windows you can try reading this and this first. However, an expert in Windows can leave a more precise instructions in the comments.

Execute the task

The patch added a task that must be executed in command line:

php symfony siwapp:rebuild-slugs

It will rebuild the internal names for all your customers and report the number of customers modified.

Thats all!


  1. Leroy
    Posted 2012/01/31 at 16:02 | Permalink

    Small issue?? this is a big issue!
    I cant work with my Siwapp anymore. And i lost all my invoices. I have to look for another opensource invoice solution right now. I don’t understand the fixes you come up with. And im not that technical.

  2. Posted 2012/01/31 at 16:53 | Permalink

    What have you done? When did it stop working? Was it upgrading to PHP5.3? Trying to apply the patch?

  3. Leroy
    Posted 2012/01/31 at 20:29 | Permalink

    My Siwapp used to work.. i didnt changed anything…
    but suddenly when surfing to my siwapp i had a internal server error.
    So i reinstalled the latest version. All chmod and settings where correct and siwapp said it was installed. but when going to /web/
    Still internal server error.
    I thought first it was because my php version when i saw this message… but now i see that i still have php 5.2.17

    My system info:
    Apache 2.2.21 Running
    DirectAdmin 1.39.3 Running
    Exim 4.76 Running
    MySQL 5.0.67 Running
    Named 9.3.4 Running
    ProFTPd 1.3.3c Running
    sshd Running
    dovecot 2.0.16 Running
    Php 5.2.17 Installed

  4. Leroy
    Posted 2012/02/02 at 20:57 | Permalink

    Im running it on a localhost server now! (wamp)
    Pretty good solution for now… maybe in the future ill give it another try.

  5. Posted 2013/10/16 at 00:15 | Permalink

    My spouse and I absolutely love your blog and find
    almost all of your post’s to be exactly I’m looking for.
    Does one offer guest writers to write content for yourself?
    I wouldn’t mind publishing a post or elaborating on a lot of the subjects
    you write in relation to here. Again, awesome weblog!

  6. Posted 2013/10/22 at 09:52 | Permalink

    I had installed siwapp and it was working fine till now. Right now I am having problem when I try to print the invoice or I try to save as PDF.. it gives a 500 server error.

    Please help.

    My php version is 5.3.26

    Since it is a shared hosting, I dont have much control on the php version, so I need to figure out a solution, otherwise I would have to very sadly change to some other invoicing system.. I had somehow started to like this one.. 


  7. Pierre
    Posted 2014/03/06 at 14:17 | Permalink

    Hello, I am not sure if my problem is the same.
    My siwapp was running well with PHP 5.2. Since I upgrade PHP to 5.3, I can not login anymore. When I enter my username and password and type “enter”, the same window is display with the username and password filed empty. If I switch back to 5.2, it works. My username has no accent. What should I do, because I need to keeo 5.3. Siwapp is install by my provider and I can not enter linux command. Cheers

  8. Pierre
    Posted 2014/03/15 at 10:00 | Permalink

    I am using Siwapp and I am very happy with this.
    For some reasons, I had to upgrade PHP 5.2 to 5.3

    Since I am with 5.3, I can not signin. I entered my correct username and password and I have no error message and can not access my admin panel.
    To login, I have to trurn to PHP 5.2
    I have no controll on the web server and I can not do the bove solution.
    Someone know to solve my problem?

    My user name and passewor has not special caracter, no accent. My password has 1 number.

    Do you know what can I do?


  9. Posted 2014/09/05 at 23:44 | Permalink

    Just after installation finishes:

    Oops! An Error Occurred
    The server returned a “500 Internal Server Error”.
    Something is broken
    Please e-mail us at [email] and let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

    Could you give us any hint?

  10. Posted 2014/10/14 at 22:37 | Permalink

    Hello outstanding blog! Does running a blog similar to
    this take a massive amount work? I’ve very little
    knowledge of coding but I was hoping to start my own blog in the near future.
    Anyway, if you have any suggestions or techniques for new blog owners please share.
    I know this is off subject however I simply had to ask.
    Thank you!

Post a Comment

Your email is never shared. Required fields are marked *