Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

Server Error?

See attached.

My customer gets this error when trying to run custom php scripts against a MySQL database.

She has tried it in Firefox & Chrome; same result in both.

When I do it, it works as it should (no error).

The host is GoDaddy.

Any ideas?

I'm GUESSING it's Apache; I really don't know.
Screen-Shot-2015-07-31-at-2.55.49-PM.png
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Take a look at the apache error log to see what is being reported.  Also, make a note of the exact url she is accessing.
It is most likely an error in your scripts that is sensitive to the REMOTE_ADDR that she is coming from.  Is she able to run any simple scripts on the same server?  I always put up a simple test script to make sure PHP itself is running.  The standard 'Hello World' script will do for that.
<?php
echo "Hello World";
?>

Open in new window

Avatar of Richard Korts

ASKER

Dave,

I think it's GoDaddy. I was able to run two of the processes myself, then I got the same error on another one.

Everything she was running ran earlier, many times. These are "month end reports".

I think it is execution time related; that is, the longer the script runs, the greater the odd's it will fail.

I'm setting it up to test on a NON-GoDaddy server.

Richard
I think it is execution time related; that is, the longer the script runs, the greater the odd's it will fail.
I don't see how that has anything to do with Godaddy.  The max_execution_time on both my Godaddy Linux and Windows accounts is 30 seconds as it is on my own web site account elsewhere and on Network Solutions accounts for two of my clients.  It's also the default in 'php.ini' http://php.net/manual/en/ini.list.php

Now I am responsible for two accounts that have longer execution times but you normally have to set that yourself or get your host to change it.
Dave,

The customer (owner) call GoDaddy; they told him (I HAD NOT communicated what I thought to the owner) to increase the maximum execution time in php.ini.

I didn't think it was that simple on a shared hosting plan, I called GoDaddy, the tech support person said to create a file called .user.ini at the site root & put the php ini commands in there.

max_execution_time was set to 120 (2 minutes) in php.ini.

So I put ini_set('max_execution_time', 300); into that file.

What is your reaction to that?

FYI, the programs failing on Friday are running fine today (no changes) BEFORE I did this .user.ini thing.

Thanks,

Richard
Sounds good to me.  That only works on the Linux accounts last time I asked.  For my Windows account, I would have to recreate the entire 'php.ini' file which of course I do not have access to.
Dave,

So I did that & the plot thickens. I upped the time to 300 (5 minutes). The customer ran one specific report, it gave the same server error message as last week.

Do you know if they measure max_execution_time in elapsed time or cpu time?

Thanks,

Richard
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The problem is not solved.

Or, I should say, it disappeared.

Today all the reports run fine.

I did find one temporary table that was created was not being cleared out at the end (as it should have been), I fixed that.

But the cause is not clear, that was not the only report that failed.

On Friday I moved the whole database & all the php, etc., to another server I use, everything worked fine (& VERY QUICKLY) there.

So I am convinced it is GoDaddy related & will pop up again.

I am awarding points for the good ideas presented & effort.

Thanks