Go Back   HostGator Peer Support Forums > Public Forums > Pre-Sales Questions

Notices

Reply
 
Thread Tools
  #1  
Old 07-14-2007, 10:06 PM
anjanesh's Avatar
anjanesh anjanesh is offline
Hatchling Croc
 
Join Date: Mar 2007
Location: Mumbai, India
Posts: 29
Default Measuring Resources

Hi

How can one measure this too many resources thing ?

Within a month or two, I want to get a shared-host an upload a PHP/MySQL website which Im currently developing on my PC using PHP 5 and MySQL 5. Though the site wont get heavy traffic as it would be a limited-community based website (like an alumni), the scripts is totally PHP5 OOP based and I have a single index.html file which loads (require_once()) other php files by passing as an argument to index.html. [ domain.com/news.htm?id=34 will actually be mod_rewrited to index.html?module=news&newsid=34 ].

As a result, I had to insert in the beginning of index.html

PHP Code:
PHP Code:
header("Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0"); 
( Working out a method on how to cache based on REQUEST_URI )
I would've gone with ASO but their PHP5 is FastCGI based and this is not really an issue, but other mod_* extensions like mcrypt etc are only available if you use PHP4.

So how can I monitor my resource usage ?

Thanks
Reply With Quote
  #2  
Old 07-14-2007, 10:54 PM
riostyles riostyles is offline
Royal Croc
 
Join Date: Jan 2006
Location: Rio de Janeiro, Brazil
Posts: 765
Default Re: Measuring Resources

Hello, welcome.
Yourcomputer or HostGator ressources?
As fro your script, so far as I know,
PHP 5.2.2 is implemented,
fastCGI is not yet,
Mysql version is 4.1.21 and the downgrad are not easy but possible.

For the index.html you have a simple workaround: when uploaded just rename the file index.php (and the pointers to them or a rewrite)
Reply With Quote
  #3  
Old 07-14-2007, 11:23 PM
anjanesh's Avatar
anjanesh anjanesh is offline
Hatchling Croc
 
Join Date: Mar 2007
Location: Mumbai, India
Posts: 29
Default Re: Measuring Resources

Talking abt HG resources.

downgrade ? Im looking for MySQL 5.x and Im not really looking for PHP run as FastCGI - I want the other mod_ modules required.
For index.html I have AddType application/x-httpd-php .html in my htaccess so it runs as PHP.

My index file includes other php files . There may be something like 10-50 mysql queries (mainly select and update) till the script finishes.

Want to know if this is acceptable.
__________________
Anjanesh
Reply With Quote
  #4  
Old 07-15-2007, 01:21 AM
riostyles riostyles is offline
Royal Croc
 
Join Date: Jan 2006
Location: Rio de Janeiro, Brazil
Posts: 765
Default Re: Measuring Resources

For Mysql 5, maybe an HG tech will step-in since just ticket the support.
The AddType is good to, just all the html files will be parsed domain wide. If you have only a few, no problem.
10-50 queries is nothing IF you do not use any permanent connect like ..._pconnect.
Have fun here.
Reply With Quote
  #5  
Old 07-15-2007, 01:28 AM
riostyles riostyles is offline
Royal Croc
 
Join Date: Jan 2006
Location: Rio de Janeiro, Brazil
Posts: 765
Default Re: Measuring Resources

Here the config command for php 5.2.2 as set on my server. Some mods can be set on demand, not all.
This a non phpsueexec load running as CGI. Maybe somebody can give you the phpsueexec in php 5 load.
Configure Command './configure' '--with-xml' '--with-mm' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-dom' '--with-dom-xslt' '--with-dom-exslt' '--enable-exif' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-gettext' '--with-imap=/usr/local/imap-2004g' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--enable-memory-limit' '--with-mhash' '--enable-magic-quotes' '--with-mm' '--with-mysqli' '--with-mysql=/usr' '--with-openssl' '--enable-discard-path' '--with-pear' '--with-pspell' '--enable-xslt' '--with-xslt-sablot' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--enable-wddx' '--with-xmlrpc' '--with-zlib' '--prefix=/usr/local/php5' '--exec-prefix=/usr/local/php5' '--program-suffix=5' '--enable-force-cgi-redirect' '--enable-discard-path' '--enable-memory-limit' '--with-pdo-mysql' '--enable-soap' '--enable-simplexml'
Reply With Quote
  #6  
Old 07-15-2007, 01:49 AM
anjanesh's Avatar
anjanesh anjanesh is offline
Hatchling Croc
 
Join Date: Mar 2007
Location: Mumbai, India
Posts: 29
Default Re: Measuring Resources

I think the php config is enough. Thanks riostyles. Whats phpsueexec ?

I got to use MySQL 5.x because of stored procedures etc.

Any phpinfo available for me to know the installed modules/extension ?

Arent there any HG shared-hosting servers which host PHP5 as module (no option for PHP4) and MySQL 5 and other shared servers having PHP 4 + MySQL 4 ?
__________________
Anjanesh
Reply With Quote
  #7  
Old 07-15-2007, 02:35 AM
steve_a steve_a is offline
Baby Croc
 
Join Date: May 2007
Posts: 61
Default Re: Measuring Resources

As far as I know only dedicated server can have mysql 5. Ask sales because you might have to quit the procedures.
IF you are worried about connections create a cache class, caching tables to arrays. There will be things that are not updated too often, so you can limit the number of queries. Although if you connect() at the start of the page then run 15 queries and then close() connection, this will be 1 connection.
Reply With Quote
  #8  
Old 07-15-2007, 02:37 AM
ViragoTech ViragoTech is offline
Junior Croc
 
Join Date: Jul 2007
Posts: 170
Default Re: Measuring Resources

Whats phpsueexec ?

http://www.xoops.org/modules/smartfaq/faq.php?faqid=584
Reply With Quote
  #9  
Old 07-15-2007, 03:01 AM
anjanesh's Avatar
anjanesh anjanesh is offline
Hatchling Croc
 
Join Date: Mar 2007
Location: Mumbai, India
Posts: 29
Default Re: Measuring Resources

Guess I'll wait for HG to update to MySQL 5 and then come back (for a future website) because MySQL 5.0 is a must - many new functions have also been introduced.

phpsueexec is fine I guess - I hope it doesnt disrupt mod_rewrite etc.

Btw, does HG really allow to use 50GB space ? I mean, literally - what if 25GB of photos get uploaded (thinking community website) ?
__________________
Anjanesh
Reply With Quote
  #10  
Old 07-15-2007, 03:04 AM
riostyles riostyles is offline
Royal Croc
 
Join Date: Jan 2006
Location: Rio de Janeiro, Brazil
Posts: 765
Default Re: Measuring Resources

Quote:
Originally Posted by anjanesh View Post
I think the php config is enough. Thanks riostyles. Whats phpsueexec ?

I got to use MySQL 5.x because of stored procedures etc.

Any phpinfo available for me to know the installed modules/extension ?

Arent there any HG shared-hosting servers which host PHP5 as module (no option for PHP4) and MySQL 5 and other shared servers having PHP 4 + MySQL 4 ?
Mysql 5 question can only answered by support for shared.
Notice that all shared are dual php4 and php5
My server not being up to date yet my phpinfo() is not interesting. Somebody maybe can post you a link SOMEBODY!
Reply With Quote
  #11  
Old 07-15-2007, 03:11 AM
ViragoTech ViragoTech is offline
Junior Croc
 
Join Date: Jul 2007
Posts: 170
Default Re: Measuring Resources

50,000 inodes (+- 50k files)

Most site are similar and its done to stop folks from backing up their computer on the web. I dunno its what most say I guess cause a computer has lots of files.
Reply With Quote
  #12  
Old 07-15-2007, 03:27 AM
steve_a steve_a is offline
Baby Croc
 
Join Date: May 2007
Posts: 61
Default Re: Measuring Resources

Quote:
Originally Posted by anjanesh View Post
Btw, does HG really allow to use 50GB space ? I mean, literally - what if 25GB of photos get uploaded (thinking community website) ?
Then you will have 25GB left. Really though having 25 gig of images will mean high traffic community.
I wouldn't risk a "business" on a shared hosting plan. I would rent a server from the start just to have my piece of mind. Imagine your sites gets down and people who advertise to your site, see this.
Competition in Enterprise 2.0 is high. The only thing worth risking is money.
Reply With Quote
  #13  
Old 07-15-2007, 04:03 AM
anjanesh's Avatar
anjanesh anjanesh is offline
Hatchling Croc
 
Join Date: Mar 2007
Location: Mumbai, India
Posts: 29
Default Re: Measuring Resources

Its not going to have high traffic - because its a limited community site.
I was just wanting to know if I can store that many photos.

Btw, is it true about the 50,000 files limit ?

And why is backing-up your PC not allowed ?
__________________
Anjanesh
Reply With Quote
  #14  
Old 07-15-2007, 04:30 AM
ViragoTech ViragoTech is offline
Junior Croc
 
Join Date: Jul 2007
Posts: 170
Default Re: Measuring Resources

I dunno guy, just I have been all over many diffeent host forums and that the general reson they have a file limit

sure you could get around file limits with store archives if you zip them.
sure their file manager lets you zip things up like folders.
Reply With Quote
  #15  
Old 07-15-2007, 06:14 AM
Sam Sam is offline
Emperor Croc
 
Join Date: Jan 2007
Location: /bin/false
Posts: 3,057
Default Re: Measuring Resources

Quote:
Originally Posted by anjanesh View Post
Guess I'll wait for HG to update to MySQL 5
You can request MySQL5... http://www.hostgator.com/popup/mysqldatabases.html
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 02:41 PM.