Hi krzynio,
The default isolation level in firebird is snapshot, which means that you are unable to see written data from another transaction(php script in this case), unless you close then reopen your own transaction. The solution is simple set the isolation level to read_commited. Unfortunately I'm not familiar with Zeos, so I don't know how exactly it's done, but a quick google search should solve the problem. After the isolation level is set a query.refresh is enough to see the data commited by the php script.