guyfromfl Posted September 27, 2009 Share Posted September 27, 2009 I made a parts ordering, invoicing and shipping script for my work. I used PHP because it would be easier to update it since it would only be done on 1 computer and the web browser would provide the interface... Anyways, I spent a week writing the code up until 3 or 4 in the morning then going to work at 8am. Now, they are talking about not using it because on other machines, it takes up to a minute to load a new page. The problem is because the "IT" guy lets a remote branch of the company use 2 remote desktop sessions, sucking our bandwidth dry. He won't change that system since it was in place before I came along. Is re structuring php code going to buy me any time or is this lag created solely in the router? Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/ Share on other sites More sharing options...
Handy PHP Posted September 27, 2009 Share Posted September 27, 2009 I assume that the other machines (that load the pages slowly) are in the same building correct? If this is the case, then your bandwidth isn't as big of an issue since the connection is local unless you are using a domain name in which case, you have to leave your LAN and goto the Internet then have a nameserver send you back. It could be a router issue but more than likely, the computer that acts as the server in this situation, probably isn't capable of performing the task adequately. Network Adapter, Processor, Memory, and of course how many other processes are running can dictate how quickly the pages load. Many hosting companies use a separate servers for Apache and SQL. I guess, my suggestion is to try different connections to the script... Have the accessing systems browse directly to the hosting systems IP address to reduce router lag. Test the script on a cheap hosting account on the internet to see if there is an improvement. While restructuring your PHP script may help somewhat, it isn't going to change a load time from 1 minute to 5 seconds. However, assuming that you are using MySQL, optimizing your database queries can really improve your load time. If your script queries the DB and get information for the next query then the next, then there will be a lot of time wasted. You should try to minimize the number of separate queries by combining queries. You can search in on table for information related to another table in the same query, etc... Handy PHP Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/#findComment-925641 Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 Just forget his stupid nees and use a host lol. £1.99 month Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/#findComment-925643 Share on other sites More sharing options...
guyfromfl Posted September 27, 2009 Author Share Posted September 27, 2009 Everything I am doing is in the building. I have a server at home I could run it from, but hey already said they didn't want to store customer info "out on the internet"... I created a knowledge base for the customers that runs off that like a charm. Everybody using my application types in the lan address (http://192.168.2.x [my ip address]) to access it. Right now I am "testing" the info on my computer at work, then if everything goes well, they will let me put it on the company's data server. The problem is the "IT" guy is the GM and barley knows how to boot a windows xp home computer. Thats why i wanted to see what I could do so it wouldn't effect him. Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/#findComment-925666 Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 new mcse but no knowledge dam there grate.... pay 1500 get a cert but no nothing lol. See it hard, because you got no access,to anything valuable, the plonker has? i can suggest loads but there no point he got the finger on the button lol. there not much we can do or say really ,, Sack him lol The current server, with in the internet, has it got the accelerator from zend to speed php up? Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/#findComment-925671 Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 http://www.zend.com/en/ Zend do there own php server know, and there accelerator is integrated with it so unfortunately, you have to use there free server and php for a descent accelerator mate. I use the old zend accelerator to speed php up but it all gone DAM now it part off there new server for php.......... if you need it separately it cost $500 but was free before. sorry don't no any good accelerator anymore only new zends one. a php accelerator might help in your case, they are good well zends was. that really peed me off know i am stuffed as well. Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/#findComment-925681 Share on other sites More sharing options...
guyfromfl Posted September 27, 2009 Author Share Posted September 27, 2009 Ha, he won't let me near anything. I tried to help him change a stick of RAM once because he was going on 45 minutes but I couldnt touch anything. The machine the script is on (my computer) is running WAMP server, and POSTCAST server for sending mail, nothing special. The problem is probably in that we are on a windows server 2k3 dns and he might be restricting my incomming requests. What I am affraid of, is if I were to put it out on the windows server, IIS will screw with apache and I won't be able to get in there and configure it so the co-exist. so I might have done this whole project in vein. Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/#findComment-925683 Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 unless you create your own Lamp that means install all the service separately not use iis...... php apache mysql a bummer but worth it in this case? Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/#findComment-925684 Share on other sites More sharing options...
guyfromfl Posted September 27, 2009 Author Share Posted September 27, 2009 You can configure Apache to handle requests on different ports than 80 so they could type http://<ip address>:<dedicated port number> but i doubt he would let me get in there and make those changes I created desktop short cuts on all the user's computers so they wouldn't even have to worry about doing something different. Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/#findComment-925717 Share on other sites More sharing options...
redarrow Posted September 27, 2009 Share Posted September 27, 2009 That because your thinking like a proper admin, not a idiot that found a book one day, that said your get money if you get a cert lol. i got the mcse and my fist job was printer maintenance lol. i was so shocked, and i was good at it all, madness so i left and joined a friend at level three .... then i study the Crisco stuff, then i got board again lol.... my eyes got to bad but i got 12 certs lol.........(( not bad for a blind man lol i can only see shadows but fill every think and build a pc/ server and install a Cisco router and config it, i had loads of competitions with healthy eyed people in configuring the cisco box...... grate fun.... i also was helping to install broadband in lift shaft's my friends don't like heights but i can only fill the wind lol...((can always look down lol..... Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/#findComment-925743 Share on other sites More sharing options...
guyfromfl Posted September 27, 2009 Author Share Posted September 27, 2009 Thats funny about the cert thing... I have applied at several jobs Id rather be doing but nobody will hire because I dont have that/those peices of paper... my best option other than my job now is to start as entrylevel programmer for a website hosting company.. The only reason Im still at this job is the pay isnt much different and there are 8 people in my current company and i would feel like im betraying them.. If i get a job that pays more than $1/hr more im getting already im gone with the wind ! Thanks for the input. I guess Ill just have to see what time has to offer me. Quote Link to comment https://forums.phpfreaks.com/topic/175663-php-and-load-time-optimization/#findComment-925755 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.