RSS
 

Archive for March 30th, 2006

Fatal error: Maximum execution time of 30 seconds exceeded

30 Mar

When PHP is processing a file upload and you receive the error message “Fatal error: Maximum execution time of 30 seconds exceeded” it is because the script has timed out. I was working on an application where this was occuring during a file upload. The entire file would be uploaded, then the error would be displayed

Various websites instruct you to call set_time_limit() on the upload page. This overrides the max_execution_time setting which is found in php.ini. Calling this function on my upload page seems to have no effect on my server.  Changing max_execution_time in php.ini to 0 is supposed to be an unlimited timeout. However i was still receiving the error message. It would say “Fatal error: Maximum execution time of 0 seconds exceeded” which does not make any sense to me at all.

I discovered that, in addition to max_execution_time there is an additional setting max_input_time which controls how long a php file can spend processing the request data.  When i set max_input_time to a higher value, the problem goes away. So, it appears that the error message is reporting the wrong configuration variable.

These settings are found in php.ini, however depending on your host you may be able to override them either in your script or in an .htaccess file.   After you update php.ini you may have to restart your https server process to reload the php settings.  (windows servers may need to recycle the application pool).

 
24 Comments

Posted in PHP

 

ASP VBScript – working with SQL Server nText Fields

30 Mar

I ran into a problem with nText fields when porting a third-party app from MS Access to MS SQL Server. Wherever the existing code tried to get the value of an nText field in the RecordSet object, the return value would be blank.

I searched all over and found a workaround, which I did not like. The work-around suggested by many is that you must specifically select all fields in your SQL query In other words, you can’t do “SELECT * FROM”, you have to do “SELECT field1,field2,field3 FROM”. in addition to that, they say that you have to select the nText field LAST in your query. It has to be the last field in the list. And in addition to that, you have to then read that value from the RecordSet FIRST before accessing any other fields. So, you have to store it in a variable and save it until you need it.

Needless to say, this can be a painful process depending on how crappy the code you’re dealing with. However I found a solution that worked better. by simply changing the RecordSet LockType property to 1 PRIOR to opening the RecordSet, I don’t have this problem at all.

my RS settings that seem to work with nText fields are:

rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 1

i set these properties prior to calling rs.Open of course.

best of luck with your code!

 
No Comments

Posted in Windows

 

Changing your default Outlook .pst data file

30 Mar

If you want to replace the default outlook data file (.pst) with another file, you have to change a few things. You may want to do this if you’re upgrading to a new machine or if (like me) you like to move your datafile to a different location.

To replace the default datafile, do the following:

1. Either create a new data (.pst) file or open your old data file that you want to have as your default. Save it wherever you like. (Use File -> New -> Outlook Data File or File -> Open -> Outlook Data File)

2. Go to Tools -> Email Accounts. Select “View or Change Existing Accounts”

3. On this page, you’ll see a drop-down: “Deliver new e-mail to the following location:” Select the new datafile that you want to use as your default.

4. You’ll be alerted that Outlook must be restarted. Go ahead and close Outlook, then re-open it. Your datafile is now the default delivery location for email. You can right-click the old data file and close it if you like.

5. At this point, everything will work except that your contacts will not show up properly when you click the “To:” button. You need to re-link your contacts folder to the Address Book. If you don’t know how to do this, there’s another post here: [url]http://www.verysimple.com/support/viewtopic.php?t=203[/url]

 
No Comments

Posted in Windows

 

Cingular Connection Manager Conflicts with Visual Studio.NET

30 Mar

If you are a .NET web application developer and you install Cincular Connection Manager, you’ll be in for a treat when none of your .NET web applications will run anymore! When you try to connect to one, you’ll hear a windows alert beep, but will see no error message displayed.

The solution at the moment is to not install Connection Manager. If you uninstall Connection Manager, the good news is that your web apps will all go back to normal and will work again. whew!

However, you really don’t need the software to use your Cingular cell phone to dial-up to the internet. You can simply create a new Dial-Up account. Select your cellphone as the modem and then enter the following for the dial-up parameters:

number to dial: *99***1# -or- *99***2#

(the number 1 or 2 depends on what order your cellphone shows up in your list of modems. it might even need to be 3?)

username: ISP@CINGULARGPRS.COM (case sensitive)

password: CINGULAR1 (case sensitive)

You can just dial-up through your cellphone as if it were a regular modem.

You have to have the data connection added to your cellphone plan for this to work at all, by the way. You also have to have your cellphone connected using the data connection cable or bluetooth and the correct drivers for your phone need to be installed. You’re on your own for that part!

 
No Comments

Posted in .NET, Windows

 

Outlook Contacts don't show up when clicking the 'To' Button

30 Mar

If you replace your default outlook data file (ie, you move your old file to a new computer or restore a backup) you may not get a list of your contacts when you click the “To” button.

When you click the “To” button in Outlook 2003, it actually displays the Address Book. Back in the day, the Address Book used to be Windows main app for storing contact information and it is shared by various Windows applications. Your Outlook Contacts folder needs to be linked to the Address Book in order for those name to show up when you’re composing messages. You can actually have as many Contacts folders as you like and link them all to the address book.

To link a Contacts folder to the Address Book, click on the “Contacts” navigation item in Outlook. You should see your Contacts folder in the upper-left pane and all of your actual contact records in the right pane.

Right-click on the contacts folder (not the outlook navigation item, but the actual contacts folder) and select “Properties”

On the contacts properties dialog, there is a tab labeled “Outlook Address Book” Click this tab. Here you’ll see a checkbox that is labeled “Show this folder as an e-mail Address Book.” Check this box to link this contacts folder with your Address Book. You can repeat the process for as many Contacts folders as you like.

All of the contact within this folder should now show up when you click the “To” button in an email message.

 
1 Comment

Posted in Windows