When software systems are introduced, they are typically deployed in field environments similar to those used during development and testing. However, these systems may also be used in various other locations with different environmental conditions, making it challenging to improve software reliability. Factors such as the specific operating environment and the location of bugs in the code contribute to this difficulty. In this paper, we propose a new software reliability model that accounts for the uncertainty of operating environments. We present the explicit closed-form mean value function solution for the proposed model. The model's goodness of fit is demonstrated by comparing it to the nonhomogeneous Poisson process (NHPP) model based on Weibull model, using four sets of failure data sets from software applications. The proposed model performs well under various estimation techniques, making it a versatile tool for practitioners and researchers alike. The proposed model outperforms other existing NHPP Weibull based in terms of fitting accuracy under two different methods of estimation and provides a more detailed and precise evaluation of software reliability. Additionally, sensitivity analysis shows that the parameters of the suggested distribution significantly impact the mean value function.