Finding slow parts of PHP code [closed] - php

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am new on php . i am currently on the project that have a php file contain approx 2500 line of code.
This script is working fine in localhost but on the server it take a lot of time to reload the page.
I want to know that is there any tool or website that find out the slow running code from php script.
Any help will be appreciated..

I strongly recommend using xdebug for that - it has an integrated profiling solution. You can then parse these files with Webgrind
If you use software like XAMPP or MAMP, xdebug could be already with it. There are also lots of useful information how to setup xdebug like here http://unitstep.net/blog/2009/01/26/getting-xdebug-to-work-with-apachexampp-to-debug-php/
Maybe the server is also slower than your local machine.

Xdebug is pretty much the standard when it comes to PHP.

Some profiler will help here. The best of known to me is Xdebug. It has plugins for many IDEs.

Related

How can I download and install correctly apache with PHP, MySQL, etc... for localhost? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Please I need help, I have a project, but i'm tired of making my code and uploading it to the server, I need a localhost to make it more faster and I was thinking of apache but I don't know how to download it correctly
Well if you are going to install them one by one it will be a bit tricky (for beginners).
If you have never done it before I recommend Zend Server Community edition. The installer is pretty good it sets up everything for you.
http://www.zend.com/en/products/server/free-edition
But if you are an adventurous kind the minimum I would imagine you would need to install is
Apache Httpd => http://httpd.apache.org/download.cgi
PHP => http://php.net/downloads.php
MySQL => http://dev.mysql.com/downloads/mysql/
As you haven't mentioned which OS you want to configure it on. But I think you will find a lot of tutorials for any platform for each.
man just download XAMPP, a few click install.. and done.. since you sound like you have no idea of how to start... then this would be perfect.. just check it out for your self.

What is needed to set up a PHP development and production environment? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have inherited a little database driven PHP site.
I am a C# programmer, and have almost zero experience with PHP, although I have great experience with databases and some html / web design.
My boss tasked me to create a staging and production environment for this php site.
Environment: Win 7, 64 bit. Sql Server 2012. PHP 5.2. There are a couple hundred users. We only the need the site to work with explorer. Dreamweaver latest version. There would not be more than 1 user working on the project at a time.
Which code repository should we go with?
For now we are not going with a code repository yet. Besides having separate folders for staging and production, would we need any other folder structure?
I also would be very grateful for your help in formulating the right questions to ensure that I have everything that a "professional" developer needs to set this up.
Maybe.. You're looking for http://www.xampp.org, its an all in one solution :)
You can however customize the environment once installed.
Even the PRO's use it :) because it makes it all very simple and quick :)

Offering a trial version of a PHP application, easier alternatives to ioncube, zendguard & c.? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I developed and distributed a trial version of a PHP software I sell.
I used ioncube to encode the PHP source and check the installation date online. It works pretty well but the problem is that most of the users who downloaded the trial don't even install it, probably because they realize they need to edit php.ini and copy the ioncube loader somewhere in their computers.
Almost all the similar questions on stackoverflow advise ioncube, zend or similar solution...could you advise a simpler (from the point of view of the user) solution?
I don't care if it is less secure than ioncube, I'm ok if it works and prevent cracking for most of the user.
Thanks in advance.
PHP is a scripting language, and it can be quite easy to decode (and disable the trial functionality)
What you could try is hosting it on a demo server, granting access to that for a limited time, and then later revoke access when the trial period is over

Free Web Servers PHP [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Can anyone suggest me some free webservers, where i can upload my site and test it. My current one is giving me and error, that actually should not happen. And maybe it works with another server.
I've found izfree to be pretty good when I've needed quick hosting in a pinch. I wouldn't recommend it for anything in production though as its uptime isn't as good as it could be.
EDIT: Although looking at it, it may not even be maintained anymore. I last used it in 2009...
Simply set up a local server with programs like xampp. You can download it here: http://www.apachefriends.org/en/xampp.html
Much faster, agile and more convenient than testing on actual servers.

My first vps! Where to start? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I just got my first vps which i will use for an online game. However, I have only worked with normal webhost so far (with control panel, mysql, php, phpmyadmin already installed), and I have no idea what to do now. The only thing I have is the ip adress, username and password to the vps.
I would like to have some kind of control panel to login to see some stats, phpmyadmin to control the mysql database, and the ability to upload and store the .php files thats talks with the mysql db. I read a little about LAMP (apache), is that good?
Where do I start?
Many thanks
VPS os is debian 6.
Im using a mac
Linode library and Slicehost articles are good places to start.
perhaps check out webmin (http://www.webmin.com/) for a control panel, and howtoforge (http://www.howtoforge.com/ubuntu_debian_lamp_server) - there are tons of tutorials out there to get you started (google is your friend), and no one simple answer. NARKOZ suggestions are very good too.

Categories