PHP wamp server error - php

I am pretty new on php particularly wamp. I got to access a live wamp server. PHP version 5.2.5. But my app needs to use PHP 5.3.0, so I just uninstall wamp from live server and install new wamp with PHP 5.3.0. Now the new installed server is not getting started. On starting it gives error that
php_pdo.dll file was not found. RE-installing app could fix problem.
Also the icon is still yellow. I want to know what the problem is with server and how this fix? Also is there some thing because of previously installed wamp server?
Pleas do tell me as it was live server so I need to fix things as quickly as possible.

Having PHP 5.3 you no longer need to have to activate PDO through the php.ini file. That means you're good to go using PDO natively.
This step is not necessary for PHP 5.3
and above, as a DLL is no longer
required for PDO.
http://www.php.net/manual/en/pdo.installation.php

It means that you didn't load the PDO extension. Do a right click on the WAMP icon in your task bar and under PHP menu enable the PDO extension. Restart wamp and the problem should be solved.

Click on the wamp server icon on your taskbar, go to Apache and you will find Test Port 80 in there. That will show whether port 80 is available or not. If not, go to httpd.conf file which is in the Apache menu of wamp server, find line Listen 80. Change 80 to 88. Restart All Services in wamp and that should work. Let me know if that helped.

Related

XAMPP 2 instances on one server

I want to run 2 XAMPP instances on a Windows 2016 server.
1 XAMPP version 3.2.4 is already running:
Now version 3.2.4 has default PHP7x running and I need PHP5 also for a website. I tried to run PHP5 on the same instance. And for this I tried to follow: Is there way to use two PHP versions in XAMPP?.
Unfortunately I could not make it work. So I went for another approach and that is installing another version of XAMPP on the same server. I went for version 3.2.2. I changed the ports like stated in this url: How to change XAMPP apache server port?
But still doesnt work. Seems that my apache is hanging. Here is a screenshot:
Can anyone help me to get the 3.2.2 running? Thanks!
Fixed it. This is how to fix it: Change Apache service name. And then, while Apache is not running, click on the red cross (in the screenshot you see a green check mark but this was a red cross first) this will install Apache. Then run localhost en go to http://localhost:8080 and now its working. Two XAMPPs running at the same time.
Screenshot of chaning the Apache service name (you can go here by clicking on the Config button which you see also in the screenshot at the upper right corner):
In services you can see that there are two Apache running now from two XAMPP installations:

I have both WAMP and APACHE installed. Do i just need one or both?

I downloaded APACHE to use as a server on my local machine. I tested it by turning it on 'http.exe' I believe it's called. And storing a 'index.php' file that just says "It works". It showed this file when I went on local host on my browser.
I've downloaded My SQL work bench, and WAMP, and PHPMyAdmin.
My question is, do I need to uninstall Apache since my WAMP local server is on. Because when I type in local host in to my browser it takes me to the WAMP server configuration page, instead of showing "It works".
So does this mean I don't need Apache any more?
WAMP is basically Apache,php and Mysql package. Once it is installed you have installed these 3 and ready to go. You don't need separate one. Phpmyadmin also installed there.
Once it is installed you can have a tray icon in right bottom of the desktop. Use this menu to manage Wamp for eg: Start or stop Apace and Mysql, configure Apache,PHP and Mysql etc. Once you started the apache and mysql. Just type http://localhost in web browser to check the installation is ok or not. Remember C:/wamp/www is the webroot where your php files should go.
Wamp includes Apache, so you don't need a separate installation.
WAMP stands for "Windows Apache MySQL PHP"
So having WAMP means you have Apache, PHP, MySQL, PHPMyAdmin etc.
To run PHP code you need Apache server. And WAMP is an apache server environment. Same as LAMP (Linux version) or XAMPP (my favourite, stands for "Cross-platform Apache MySQL PHP Perl")

XAMPP configuration failed on XP

My OS is XP sp2. I downloaded XAMPP (new version of XAMPP 1.7.7) from apachefriends . Then installed. I read many articles and saw videos. but still I couldn't go to the 'http://localhost/xampp' .Browser says
This webpage is not available
When I started both mysql and the apache, here is a screen shot.
As all tutorials on the internet says, when I started, there is a green color label saying 'Running' infrom of the each component. Here there is nothing showed, but there is something in the console.But I can't see any php page in the browser after any related URL is typed. I m an absolute beginner for this.
New
I installed Apache 2.2 manually. Then it runs well and XAMPP shows Apache is in running. When the URL typed 'localhost', Apache's htdocs html page is appeared. So, now I assume that there is no issue in the port '80'(as the manually installed apache is running on it). I want to configure the XAMPP to work with my manually installed apache version. Any suggestion please ? Thanks in advance.
Make sure no other application is using port 80. (Skype does for example. Close Skype restart Apache).
Check if anything is running with netstat in cmd.

PHP -> CLI has stopped working

I recently installed Windows 7 on my desktop and the following problem has begun occuring:
I regularly run some PHP scripts from the commandline that are now giving this error in a popup window:
CLI has stopped working.
I cancel this and my script terminates. Not good...
I've googled around and tried most of the few ideas suggested but still i am plagued by this annoyance. Right now it appears to regularly occur when I do a file_get_contents() of a url pointing to an image file. Only happens when the url is http protocol, works fine for ftp files. It also happens spuriously doing other things as well.
This is PHP 5.3.0 as distributed in a xampp 1.7.2 .zip. All exe's and dll's have been unblocked by copying thru FAT32 and back.
hints from anyone who's cracked this would be most helpful.
Try updating your PHP version bundled with xampp. You might have to update some php_XXX.dll extension files.
More info: http://web2.0entrepreneur.com/31/cli-has-stopped-working-on-windows-vista.html
PHP-CLI stops under these circumstances: Windows 7 64bit, PHP 5.6.8 64bit, only when Zend OpCache extension is ENABLED!!!
Just edit php.ini and comment zend_extension=php_opcache.dll (with ; in front of it)
I found that this happened to me when I had the APC extension enabled. I switched to using the Wincache for PHP extension instead.
If you receive this error after installing WAMP, most likely you have another installation of PHP on your machine. This may have been installed using the Microsoft Web Platform Installer or by other means. The first thing you should do is un-install PHP.
If this doesn't work, check to make sure that IIS and Apache are not trying to use the same port. WAMP starts out with Port 80 as standard and IIS usually will be the same. The easiest way to fix this is to turn off IIS while running WAMP, but you can set either of them servers to port 81 or another port.
If this doesn't work, my last suggest is to look for multiple copies of php.ini on your machine. You may find them in places like the Windows directory. Make a backup of the file just in case, and then remove them from all of the folders except the WAMP folder.
it happened to me in laravel 5.I searched every where but no solution that fix my problem then i debug my web application at different points and found that if you comment your php code in laravel comments in blade template like
{{--print_r($date_a);--}}
Now comment like this
//print_r($date_a);
works
The solution for me was to stop using PHP 5.3.0 and go back to 5.2.11. Once I did this the "CLI has stopped working" issue disappeared.
I have the same issue with Windows 7 Professional.
My Apache Server has no problem finding and executing PHP within my web application but the command line execution gives the infamous message "CLI has stopped working."
The User Account Settings seem to allow executions.
Perl has no problem.
I always have to take my code to an XP machine and run it there to debug it.
You didn't specify that you were using xdebug, but just in case you were, I may be able to help. I had this error for a long time. It turned out I was on a slightly older version of Xdebug (php_xdebug-2.2.0-5.4-vc9.dll).
I replaced that file with "php_xdebug-2.2.2-5.4-vc9.dll" and it magically started working immediately.
I'm on wamp, and I updated both php.ini files (one is for cli, one for normal use) with the latest filename.
"zend_extension = c:\wamp\bin\php\php5.4.3\ext\php_xdebug-2.2.2-5.4-vc9.dll"
Then dropped the new file into the php ext folder and instant success.
I had the same issue on Windows 7 (Home premium). I had a hunch that it is caused by one of the extensions I installed so I started commenting them out one-by-one.
Turned out it was caused by a non-compatible mongodb extension I was using
Edit php.ini and comment zend_extension=opcache.enable_cli=1 (with ; in front of it)
Try to use another php version instead.
It works perfectly for me.
Try to run scripts with php-cgi.exe instead of php.exe. For me it works.

WAMP server and PHP

I am using a WAMP server on a Windows Vista machine, and I am trying to do my first steps in PHP programming.
The problem is that the PHP include function dosn't work, and I don't know what the problem is! My code runs on other servers at work, but do not run in WAMP!
With WAMP server started try going to PHP > PHP Extensions from the taskbar icon and see if the extension that the function uses in enabled. Most of what you want should be available from this list.
Try to open php MyAdmin from Wamp - to make sure Apache is process is running - if not, nothing appears. If this is the issue, I would check if it could be problem related to port 80 (which happened to me). But if it DOES work, make sure that you use correct syntax for opening the php page as http://localhost/my_page.php

Categories