Installing html_quickform2 with EasyPHP - php

I am using the most recent version of EasyPHP (a PHP 5.5 installation) as of this writing and it does not have Pear installed. That wasn't a problem until I read about html_quickform2 which seemed like a useful utility but I couldn't figure out how to add it to my project. It's installable via Pear but that's not included with EasyPHP anymore and I'm not sure how to set it up.
Does anyone know how to do this? Otherwise, is there a simple PHP library that allows me to just drop a couple of PHP files into my application instead?

See the installation instructions on the PEAR website.

Related

Working with yaml

Me and a friend of mine are working with a project. She was responsible for a part of it, while I would add some functionalities to her code. So she send me her code and I should make it work in my machine and add my part.
However, I'm facing this problem. She has used yaml in the project (which I had no idea it existed before, I don't do web programming, only algorithm implementation). I tried to follow her instructions but got stuck at
Fatal error: Call to undefined function yaml_parse_file() in /var/www/html/cdn/map_of_site.php on line 8
So I thought that I should install the yaml library (which I think I did correctly).
I also added the yaml parser in the php.ini
But the error continues to appear.
The worst part is that I won't be able to get in touch with her for a couple of days (and I kind of dislike telling her that I don't know how to make her code work).
Could you please tell me in general what is required to make a project that uses yaml_parse_file() function work? Like what should I install or where to install it ...
PS: I work with linux mint and the project is php
Your frend used a php module that you don't have installed or enabled.
You can try to install it in the regular way (I don't know linux mint myself):
- apt-get install php5-yaml
- yum install php5-yaml
Or something like that.
If yaml is not available like that, you can try to use pecl.
You need this package: http://pecl.php.net/package/yaml
If you have pecl installed on your system (apt-get install pecl), you can just do pecl install yaml.
Usually when the extension is installed it is also directly enabled. You can test if it is enabled by creating a php file with <?php phpinfo(); ?> in it and running or visiting it (then search for yaml).
It turned out I hadn't installed yaml correctly. This article and the instructions that linux itself gives (<3) helped me solve it:
https://code.google.com/p/php-yaml/wiki/InstallingWithPecl

How to enable SSL extension for Composer?

I am trying to use the PayPal PHP SDK to make an online store, however the documentation tells me I need composer. When I try to install composer I get this error. I have no idea what this means, or how to fix it. What can I do to fix this? I
P.S. There are quite a few questions about this on SO, however, all of them that I have seen ask about using WAMP or something similar. I have no intention of using WAMP, or anything like that. The only thing I am trying to do is install composer properly.
EDIT: I am just using the Composer installer for Windows.
You need PHP installed whether you have a full test environment running or not. If you can't run PHP from the command line Composer stuff doesn't work. With a basic install of PHP the openssl extension is included so that error would go away.
You can install PHP manually on its own, or you could just install WAMP or any of the many others. I use Zend Server myself. It just installs everything for you so that it works without needing to mess with manual installation.
Once PHP in general is installed, though, that should get rid of this error.

PHP: How to check and install mysqlnd_qc

I would like to use this plugin because can cache the query results. But even reading the docs at
http://dev.mysql.com/doc/refman/5.5/en/apis-php-mysqlnd-qc.setup.html
http://www.php.net/manual/en/mysqlnd-qc.setup.php
still confused. Does it mean it comes with PHP 5.4 by default? If not, how I can I check if it's installed from CentOS using a command line? Also, how can I check if it's installed on my local PC running XAMPP with PHP 5.4?
Thank you.
As far as I know, none of the mysqlnd plugins are installed by default.
I've tried installing one of the mysqlnd plugins (in my case it was mysqlnd_ms), but I've had limited success. I concluded that I needed to build both the mysqlnd plugin and PHP itself from source to get it to work.
At that point I lost interest, because none of my clients are willing to build PHP from source for their environments. They want to use binary installs, preferably from a yum package repo.
I don't think these plugins will catch on as viable tools until they are installable in a more convenient way, for example through PECL or Composer.
Okay, based on this doc, PHP 5.4 has installed MySQLnd by default
http://dev.mysql.com/downloads/connector/php-mysqlnd/
and to test it using this answer
How to know if MySQLnd is the active driver?

How to install Zend Framework through PEAR using WAMPSERVER2.2 (64-bit)?

As the title states, I am having considerable problems in installing the Zend Framework through PEAR. After spending most of the day on this I'm quite surprised and frustrated with the lack of documentation, so as a result I was hoping the community would help me out.
Today I decided to change from XAMPP to WAMPSERVER2.2 for my development environment. After configuring the environment correctly and attempted to install Zend, I was dismayed to find that it does not come with the PEAR manager by default (that raises the question, why the hell not???). As a result I had to go download go-pear.phar and run the install under the command prompt >php go-pear.phar. All seems to run quite well... however, after adding the Zend channel zend.googlecode.com/svn trying to install the package via pear install zend/zend I run into problems, i.e. No releases available for package "zend.googlecode.com/svn/zend" install failed.
Tearing my hair out over this... could it be that pear was installed incorrectly? Why after adding the channel would the install fail? Any advice would be much appreciated.
You're getting upset about the wrong things. I hope I can give you a few clarifications.
PEAR installer and the WAMP (Windows Apache MySQL PHP) stack of your choice are not connected in any way and it is good, if such packages let you handle your own PEAR environment independently from it.
The time of XAMPP and WAMPSERVER are over, use Zend Server Community Edition, it's so much better, more stable, easier to set up, easier to configure.
Zend Framework is just a library, it doesn't need any installation. Why don't you just download it, place it wherever you like and put it on your PHP include path?
The installation over PEAR as you describe it, works for me, maybe you don't have the latest PEAR manager. Find out which PEAR version you have installed with pear list.
The most important point is. You only need to learn about the PHP include path and you can solve this problem in no time in any environment independently of any W/L AMP stack or PEAR installation.
I know its a bit late, but in case someone else runs into the same problem, this may help:
http://code.google.com/p/zend/issues/detail?id=25
It's basically a problem with pear and cache.

PEAR location on install?

I'm trying to install PEAR, but I'm confused by the locations suggested.
I'm using Wampserver to run my PHP scripts, and I wanted to do unit tests. So I found PEAR.
I tried installing via the go-pear.bat file, but that didn't work.
I found out more about this here: http://blog.pear.php.net/2009/07/01/php-53-windows-and-pear/
So I downloaded the php file. The comments in the file suggest I
Put go-pear.php on your webserver,
where you would put your website
I find this a little strange. Still, I put it in the folder along with the other php files. Here's what I was presented with:
Maybe it is because I'm not very experienced with this, but I would initially believe I should put PEAR in a central location, using 1 pear install for all possible future projects.
Or is this the prefered configuration? And why?
Using a central location is the standard approach - it sometimes makes sense to have individual installs though, particularly if a speficic project requires older versions of some pear packages and would break if newer versions were installed.
Here's a pretty straightforward tutorial on how to set up PEAR on Wamp.
http://trac.symfony-project.org/wiki/HowToInstallPearOnWindowsWithWamp
You may have missed a few steps like adding PEAR to the PATH for Windows.
Also if you have a lot of problems with WAMPServer (I used to) there are alternatives like Zend Server Community Edition. http://www.zend.com/en/products/server-ce/index

Categories