I posted a few days ago. You may remember I've had web host problems due to PHP using too much CPU on my previous host. I'm looking into a new host, and have found one who tells me that with the PHP usage I mentioned (includes, PHPNews, and a couple of small PHP scripts), I'd need to use their dedicated servers, which I can't afford. Another host is willing to work with me, although they cost a little more. I want to ask some questions before I make a final decision. I didn't know PHP uses so many resources, but I switched to PHP instead of Perl, just because it seemed the better thing to do, and to be more organized. I don't actually know PHP, except for includes and echos, basically; I've just been able to get certain types of scripts working. I have no real problem going back to Perl if I can use PHP and Perl without causing CPU problems. Let's see if I can ask what I want to ask without sounding confusing...
Each page on my site calls three files, using PHP include(): doctype.php, header.php, and footer.php.
Each page of links also calls a linkstext.php file.
The header.php file also calls an additional file: global.php, which means each page calls that file, since each page uses the header file.
global.php contains a list of words and phrases that are repeated throughout my site many times, so I can simply put
Code:
<?php echo _WORD; ?>
and whatever text I've set for "_WORD" in global.php will show up in place of it when a visitor reads the file. There are many of these types of echos.
footer.php also uses the following "Last modified" script to post when the page was last modified:
Code:
<?php include("/path/to/scripts/modified.php"); ?>
Will all of this alone cause high CPU usage? At minimum, I'd like to use the above files and PHP calls, although I'm willing to do without the global.php and PHP echo() calls, if it would make a difference. Everything following this sentence is optional:
Next, I would like to use PHPNews, a program located at
http://newsphp.sourceforge.net. Do you know if this uses a lot of CPU resources? It does use a MySQL database. Again, I can forego using this program, or any news program, if necessary, but I'd like to use it if it shouldn't be a problem. If it will be a problem, do you think finding a similar Perl program would be ok?
Finally, I also use a program called CJ Random Quote (
http://www.hotscripts.com/Detailed/21571.html), simply to rotate text and show a random quote. This is a minor program to me.
As much as I love using PHP, is there another coding language I can use to do the same thing as PHP includes and echos, without overusing CPU resources? Thank you.