Elapsed Time to initial load take too long time? - php

I have a news website used Joomla 2.5, and I'm beginner at Joomla and Apache server.
My problem is the first load take too long time and I tried all the ways I found it in the internet but nothing happening.
I know my problem goes around waiting time, but I don't know how I can fix it.
Please take a look on this report.
http://www.webpagetest.org/result/130605_X1_KVF/
http://gtmetrix.com/reports/alamnews.net/tQ4nGQ4Y
Thanks

Check more closely with proper tools.
Check Firebug. Also YSlow provides lots of good tips.

Related

PhpStorm updates the web AUTOMATICALLY when making changes

I've been working with PhpStorm for a few months and without the need to save, it already automatically updates any change I make on the production website. This leads to numerous problems and headaches, since sometimes it does not save correctly, it deletes what I have written, it includes lines that I wrote seconds ago, it copies and pastes old lines... Depending on the speed of my connection and that of the server, this tends to increase.
The time wasted using this tool is considerable, and I was wondering if there was an option to NOT update changes in real time. I want them to update ONLY on save or some other manual way that saves me from this hassle when programming.
Thanks.
I've searched the internet but can't find anything on this.
Unfortunately I have to use this tool because it is what we use in my work.
I hope someone can save me from the accumulated frustration that I have with this...

Debug PHP Using WAMP and an IDE

I recently started web development. The course I took was to install WAMP and start developing right away. I used an atom text editor, this -combined with wamp- proved to be a very fast way to write client-side code(HTML, CSS, Javascript).
But when I started to write serverside PHP things got a little messy. I should probably explain my site's structure here.
I keep separate PHP, CSS, javascript files for every page on the client side, for the server side a have 2 different types of PHP files:
Files that only perform a specific operation on the database(For example returning "5 more answers"). These are always called by AJAX requests.
Files that load the page for the first time. These are only used when the user opens the page for the first time, they do necessary database queries and return the page. Later requests always go to the 1st type of PHP files.
Now regarding my problem. I debugged until now by printing variables to the screen with var_dump() or echoing. But this started to become too slow as the data I work with grew. I wonder if there is a way of debugging which will let me but a breakpoint in one of my PHP files. Then, when I open it on the browser, on the localhost I created using WAMP, will let me go through the PHP file step by step.
I have been dealing with this issue for 3 days, I tried to make it work with Eclipse IDE but couldn't find a way. Also, there seems to be no tutorials or Q&A on the internet regarding the issue.
Breakpoint debugging opens a whole new world, and is the natural step after var_dump() debugging. Not only does it speed up development, but it provides much more information about your code, as you can step through each line and see what values have been set at each step, and how they evolve as your program executes its code. This means you can track the entirety of the values at different stages with one run - imagine tracking all variables at each point using var_dump()!
Although choosing an IDE is a personal decision based on personal taste, i strongly recommend you try out PhpStorm. If you can get a student licence go for it.
PhpStorm has extensive documentation & tutorials on all features in the IDE, debugging is no exception:
https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html
https://www.youtube.com/watch?v=GokeXqI93x8
I don't know of a specific solution to your issue. I'm not exactly sure what you're doing but as a quick tip, I find add the following snippet to the top of the file useful as it will highly error more easily rather than browser just say nope.
error_reporting(E_ALL);
ini_set('display_errors', 'On');
Hope this help you a bit.
I tried out what's recommended in comments and answers. I first tried Netbeans. To be fair it disappointed me. Download kept getting stuck at 100%, even for different versions. When I stopped downloading and went ahead to create a php project, there was missing parts I guess. I couldn't even manage to create a php project. But that might just be me not being able to do it.
Then I followed #leuquim's answer and #Alex Howansky's comment and downloaded PHPStorm. And I got it to work in no more than 20 minutes. I downloaded it with a student's licence. For people who want to use PHPStorm with WAMP here's a Youtube tutorial:
https://www.youtube.com/watch?v=CxX4vnZFbZU
One thing to note in the video is that, maker of the video chooses PHP Web Application in the Run Configurations. That has been changed to PHP Web Page.

Joomla makes my request wait for 5 seconds

I have got a very strange problem regarding one of my Joomla websites. The webpage seems to wait before it loads the actual content. So I did some research and I found out that there is a particular file (index.php/en/) that makes my request wait for over 5 seconds. See the image below.
https://imgur.com/JqlkNYq
I run on the latest version of Joomla and I haven't got any issues on other sites with plugins or components (DJ Imageslider is the only component here) so I'm really confused in where the problem can lie. I'll keep researching the problem but I hope someone may have had the same problem that can help me with this issue.
Ok, I fixed the issue. There was a module which was completely not loading anymore and giving multiple errors. With the use of debugging in the Joomla website I could track the issue.

Unix monitoring portal

I have 5 cluster servers on Unix[total of 10 unix boxes] and 5 windows servers, which I need to manage. I am looking at making a portal sort of thing, which would give me a snapshot of all the critical details, through the browser.[Mountpoint usages, cluster statuses, Oracle database health, tablespaces info etc ].
How do I go about this? I have apache installed and running on One Unix box. I started out with using the php's exec() command, and planned to use the remsh commands to fetch data from all servers, which I later realised wasn't working out.
How do I go about this?
Any pointers please.
I strongly believe I can get this done through php, but I'm not that familiar with php,but would love to get working on it.
Help please!
remsh is not allowed on my environment, typically!
I would advise that you go with an off-the-shelf solution and not try to write your own. This could be open source or proprietary. I have seen the free version of this tool and it can show much of what you described: Zenoss
Take a look at Nagios:
http://www.nagios.org/
You can also Google for "open source monitoring software"

Can anybody suggest a good Debugging package for PHP?

I use firebug and smarty so i get good debugging data from that but i'd like to see my database query times and page processing times as well.
Xdebug is very good. It works very well in combination with Netbeans IDE for PHP.
This is a great package to relay data to firebug:
http://www.firephp.org
xdebug is awesome, because it lets you step through code inspecting variables as you go.
It also lets you do profiling (dumps callgrind files into a directory of your choosing, describing in very detailed fashion what happened how many times, when, and how long everything took)
To take full advantage of xdebug, you need a good IDE, i suggest netbeans, but you can use any one of the major packages nowadays.
As linked many times by others, FirePHP and Xdebug are awesome...
But you also asked about page render times and query times.
Unless you're already using a framework that collects this data for you, you're going to need to collect it and set up reporting for it yourself.
Debugging PHP Code on Windows with Visual Studio 2008 or 2010 => http://www.jcxsoftware.com

Categories