Configuring LAMP Environment in Linux Mint using XAMPP- installing Memcache - php

Okies, I have successfully installed the XAMPP and added virtual hosts and am able to make database calls and stuff. The problem I am facing is while trying to enable the memcache module.
Currently trying to configure using these links.
http://theindexer.wordpress.com/2008/06/02/installing-a-lamp-stack-on-linux-using-xampp-for-linux/
http://theindexer.wordpress.com/2008/06/11/installing-xdebug-on-xampp-for-linux/
http://lynxbites.blogspot.com/2009/09/steps-to-install-memcache.html
The problem I am facing is while starting the phpize from /opt/lampp/bin/phpize
I am getting the following error.
Cannot find config.m4.
Make sure that you run '/opt/lampp/bin/phpize' in the top level source directory of the module
Can any one tell me wat to do for this error and if anyone has any useful links for configuring memcache on linux using XAMPP please paste here.
Thanks.

First unzip the xdebug.
In the step of phpize make sure that you can see the file named (config.m4) by issueing the (ls) command, i.e. enter inside the zipped file twice as in
~/Downloads/xdebug-2.2.3/xdebug-2.2.3# sudo phpize

Looks like you are missing some packages to install. I solved the phpize problem when tryinng to install xdebug following the following guidelines
http://www.spiration.co.uk/post/1385/Cannot-find-autoconf.-Please-check-your-autoconf-installation

Try running as root: sudo phpize...

Related

Install php extension on AMPPS

As the title says im trying to install a php extension (zip.so) that is missing from php7.1 version in ampps 3.8. I have searched for an answer but no luck so far.
Also using php5.6 and going to the php extensions list im able to see the zip extension, but since the software that im trying to intstall requires php 7.X im unable to simply use php5.6.
Thanks for the help in advance.
I finally found a way to do it:
Go to (for example) https://pecl.php.net/ and download the extension that you need.
Unzip the extension and go to the file location $ cd my/extension
Run phpize /usr/local/ampps/php-7.1/bin/phpize
Next run ./configure --with-php-config=/path/to/my/php-config for example ./configure --with-php-config=/usr/local/ampps/php-7.1/bin/php-config
make and sudo make install
In the end of sudo make install log you will find this Installing shared extensions: /usr/local/ampps/php-7.1/lib/extensions/no-debug-non-zts-20160303/ file path.
Go to the file path and you will find your compiled extension, for me it was zip.so
Finally copy the extension into your php folder /usr/local/ampps/php-7.1/lib/extensions/ext and you will be able to see it on the list of extensions in ampps, dont forget to enable it and restart apache2!
Hope it helps!
There is an easier way to do so
Open AMPPS Application ->Stop Apache (If running)
2 In "PHP" Tab -> "PHP Extension"
Enable "zip.so".
Apply
Restart Apache.
See image for clarification I am using a mac

Why Laravel doens't reconize mcrypt even though I have everything installed correctly on Yosemite OSX?

I created a new project with Laravel, then I put it in the corresponding path for apache could execute, then I write the URL in a browser to open the project and I get the following message
Mcrypt PHP extension required.
I installed mcrypt with this command
brew install homebrew/php/php55-mcrypt
and work fine when I create a new project in laravel
I was searching and I found this tutorial but still withouth work
Open /etc/php.ini and add the line below at the end extension=mcrypt.so.
If there is no php.ini file, then you need to make one from php.ini.default in the same location like so: sudo cp /etc/php.ini.default /etc/php.ini
allow write capability sudo chmod u+w /etc/php.ini
Then add the line as above in your favourite text editor: sudo nano /etc/php.ini
add in the line: extension=mcrypt.so
Restart Apache sudo apachectl restart
but still without work, what can I do?
While it's always good to do PHP stuff on a local server, you will almost always run into the issue of getting everything set up correctly if you don't know what you're doing. My advice, use a service already provided for you.
Using Homestead (Laravel's Dev Environment) will help in getting projects setup very quickly. It'll also have all the PHP modules (e.g. mcrypt) already configured.
I'd take a look at Homestead: Laravel Homestead
Try visiting: Install mcrypt for php on Mac OSX 10.10 Yosemite
OR
Just see your phpinfo(); it will give you the status for mcrypt.
OR
Try updating your php version. Visit: Update PHP
See, if that helps you.

Phalcon git installation bug?

On my sever i successfully install phalcon version 0.6.0 through git. These are the steps i used.
git clone git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install
restart the webserver
I tried to update to version 0.7.0, so i deleted the original folder and re-downloaded the git folder. I followed the same steps, after the install i check phpinfo. It installed correctly but, it installed a previous version(0.5.2).
I tried to install the extension multiple times but, it still gives me the old version.
is there something im doing wrong, any help would be appreciated.
Find if you have any phalcon.so files laying around and they are used instead of the actual one. It could very well be that the 0.5.2 is somewhere in your system, referenced by your web server and the installation process cannot update it.
locate phalcon.so
Note: for my installation it was in /usr/lib/php5/20100525/phalcon.so
Check your php.ini or your /etc/php/conf.d folder for references to the extension. If there are some remove them.
Re-run the installation process again using the
cd build
sudo ./install
Note the script output, especially at the end. It will tell you where the extension was installed.
Note the folder and add the directive in the php.ini file and then restart your web server for the changes to take effect.
It seems that you have installed PHP 5.3 on CLI but PHP 5.4 on Apache/Nginx, make sure your 'phpize' command is pointing to the 5.4 one:
[#] whereis phpize
Once you know the correct path change the priority of the executable, delete the PHP 5.3 or add an alias in the bash console:
[#] alias phpize=/path/to/5.4/phpize
Then try to run ./install again

error when installing xdebug with phpize

I am trying to install xdebug, so I used the custom installation options on the site, when it came to "phpize" I get the error:
Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module
even if I use the full path to phpize I get the same error.
I am using OS X Lion
Thanks
Ric
I was getting that error as well. What you should do is run it in the xdebug 2.2.1 directory inside the xdebug 2.2.1 directory. The second directory has a lot of files which makes sense to run the command when you've changed to that directory. This took me past that step.
Similar issue is fixed here: http://kmaiti.blogspot.co.uk/2010/08/cannot-find-configm4-phpize-resolved.html
And there is a similar PHP Bug page here too: https://bugs.php.net/bug.php?id=58650
There seems to be an issue with the location the command is run, try running it in the actual source directory for xdebug.

Can't Install libcurl PHP on Ubuntu Linux

I am trying to use the new facebook api and it requires libcurl PHP. I used
sudo apt-get install php5-curl
sudo apachectl -k restart
And it didn't work. I get the same error and the phpinfo() page says nothing about libcurl.
The source of this problem is probably that I built some of the tools from source (apache2, php), but then I got bored so installed a lot of the extensions with the package manager. But I'm not exactly how to go about diagnosing the point of failure.
The apt-get install for curl definitely worked, and can be found in
/usr/lib/php5/20060613/curl.so
I think a lot of my confusion stems from not knowing which files go where, and what purpose they have. Any help would be appreciated, and please tell me if I need to provide more information.
edit:
The specific error I get is:
Exception: Facebook needs the CURL PHP extension.
from line
if (!function_exists('curl_init')) {
throw new Exception('Facebook needs the CURL PHP extension.');
}
Ubuntu: 9.10
PHP: 5.2.13
Loaded Configuration File: /etc/php5/apache2/php.ini
In general it's a bad idea to mix and match software from your distribution's package manager with stuff you've built yourself. The package manager will not know anything about the stuff you've built yourself and so can get confused.
Not only that but who's to say the stuff from the package manager is even binary compatible with the stuff you've built yourself? If you build it all yourself then at least you know it will all be compatible.
Sounds to me like you should uninstall the extensions and build them yourself. If you can't or don't want to do that then go back and install apache and friends through your package manager but I would recommend having patience and going for the former option.
Answer of Questions
What version of Ubuntu?
What version of PHP?
How is Apache and PHP set up?
What ini files does phpinfo() say is parsed? (should be near the top)
Perhaps apt failed to properly modify your php.ini file to load the curl extension?
Check out your php.ini and see if you have line like:
extension=curl.so
or maybe:
extension=/usr/lib/php5/20060613/curl.so
To check if php-curl is installed please follow these steps:
Create a file in your web server (in Ubuntu it would be in /var/www folder), name it info.php
Open that file and type this command:
<?php phpinfo(); ?>
Save that file
Open your favorite browser and open that file (ex: http://localhost/info.php)
Now you will see the Information about your PHP installation
Search for Curl, and if you cannot find it, it mean your php doesn’t have curl installed.
To install php-curl please follow these steps:
Open your terminal and type this command:
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl php5-mcrypt
After it finish open php.ini file (mine is at /etc/php5/apache2/php.ini ) and add this command: extension=curl.so
Save the file and restart apache with this command:
/etc/init.d/apache2 restart
Check the PHP information page again, you will find PHP-CURL installed
That’s it
Source: http://www.ivankristianto.com/os/ubuntu/howto-install-curl-in-php-apache/379/

Categories