PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I'm not sure if this is a PHP or MySQL problem. I am currently running an exam booking system which at the checkout emails the booking administrator the details of the exams that have been booked.
If 1 person completes this then the system works perfectly however if more than 1 person tries to complete the booking at the same time then the email is not sent, it comes up with the following error message;
Warning: mail() [function.mail]: Failed to Receive in prog_admin\view_booking.php on line 88
The data gets stored into a mysql database which again works perfectly even when multiple users are booking exams however I get an error message saying....
Could not connect to MySQL: Can't connect to MySQL server on 'localhost' (10056)
I'm assuming it's got something to do with the number of connections being opened up with the database at 1 time. Does anyone know how to solve the problem?
Your first error probably means that your server's mail function isn't setup correctly. Most like the SMTP in the php.ini isn't correct.
Your second error means exactly what it says. It cannot connect to the mysql server on that box. Could be a number of reasons for it. Generally the username and password is not correct.
Technocrat wrote:Your first error probably means that your server's mail function isn't setup correctly. Most like the SMTP in the php.ini isn't correct.
Your second error means exactly what it says. It cannot connect to the mysql server on that box. Could be a number of reasons for it. Generally the username and password is not correct.
What I don't understand is that it's fine when 1 person does it but when there are 2 or more users then the errors occur. The username and password must be correct because when 1 user completes it then there are no errors!
I could be wrong... but according to Mysql Manual both values need to be >= 0... in fact, for Max Connection is defined with a range of 1-16384 and Max Conn per User as 0-4294967295... in both cases beeing 0 allowed to definite no limits. I don't know the effect to define them as negative values.
mikosiko wrote:I could be wrong... but according to Mysql Manual both values need to be >= 0... in fact, for Max Connection is defined with a range of 1-16384 and Max Conn per User as 0-4294967295... in both cases beeing 0 allowed to definite no limits. I don't know the effect to define them as negative values.