Try to be more specific about what is not working here so that others can help and answer your questions.
In general, if the script worked fine before and suddenly stops working, it is usually caused by external parties, it can be incompatible server, database credentials changes, files or database changed or replaced, etc.