4

I installed WAMP server and whenever I try to compile a php file it doesn't display the php part. Only the html part is being displayed. The extension of the extension of the file is .php. I have tried setting the PATH for the environment variable. Nothing worked. When I checked the error log, this is what I could find.

[05-Aug-2014 12:04:30 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library                
'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.

 in Unknown on line 0

[05-Aug-2014 12:04:31 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library     
 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be   
 found.

 in Unknown on line 0 

Please help.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
hemanth92
  • 41
  • 1
  • 1
  • 3
  • http://stackoverflow.com/a/18044239/137259 may help, replace xampp with wamp where appropriate – Fanis Hatzidakis Aug 05 '14 at 12:28
  • Hi, I'm also getting this error please help me link is http://stackoverflow.com/questions/40608309/copy-step-written-on-stackoverflow-to-install-ffmpeg-on-wamp-not-working – user3833682 Nov 16 '16 at 09:41

5 Answers5

13

All you need to do is :-

Using the wampmanager menus do

wampmanager -> Apache -> Version 

and click on the version number probably it will be 2.4.9

This will rebuild all the SYMLINKS in the apache/bin folder and Apache/PHP will be able to find the dll's required for these 2 extensions.

Also remove anything you added to the PATH env var as this will just cause problems if you ever install another version of Apache/Php, remember WAMPServer can install multi versions of both and allow you to switch between them at the click of a menu option.

WAMPServer does not need anything added to the PATH to work correctly.

ADDITIONAL INFO:

Something you said

If I click on php www directory and run the index php file (already existing).

made me think you are using Explorer, and double clicking on the php scripts from there to launch a web page. Is this what you are doing?

If you are, DONT, you have to use your browser like you were accessing any other web site.

Always use the browser address bar to launch PHP code, otherwise it never actually goes through Apache, and therefore the PHP code never actually get passed to the PHP interpreter for compilation and execution.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • I tried that earlier. I selected the version like how you said. Still the same. If I type my own php hello world code, nothing displays. If I click on php www directory and run the index php file (already existing). The php code displays on the browser. I read some other threads where they tell us to see something in the php.ini file for some extension that should be set properly. Should I try that ? – hemanth92 Aug 06 '14 at 05:32
  • See ADDITIONAL INFO on my answer. – RiggsFolly Aug 06 '14 at 08:37
  • Using PHP from commandline is an important use-case for, for example, testing with PHPUnit. I put the location of PHP into PATH. Using this technique, a different php.ini gets used (WAMP\bin\php\php5.5.12\php.ini instead of WAMP\bin\apache\apache2.4.9\bin\php.ini). Anybody using PHP from commandline can probably figure all this out :D. Clicking in explorer is another matter. – Harry Pehkonen Nov 04 '14 at 14:06
  • 1
    If you want to use the PHP CLI then the best idea is to create a batch `.bat or .cmd` file that adds the PHP folder to the PATH temporarily while a command windows runs. Adding it to the actual PATH negates one of WAMPServer major advantages, that is the ability to have multiple PHP versions installed. – RiggsFolly Nov 27 '14 at 22:17
  • +1 well done one seldom encounters such beautiful answers. PATH didn't work for me, nothing else did in fact. – qwertzman Mar 30 '15 at 15:04
  • In what way did PATH not worK? Maybe I can suggest something – RiggsFolly Mar 30 '15 at 15:05
3

Please uninstall wamp which you had been installed.. Try to install Visual C++ ie, the link is given here http://www.microsoft.com/en-in/download/confirmation.aspx?id=30679 use this link.

after downloading and installing Visual C++ you can install the Wamp server again.. So that it will work..correctly...

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
  • Hi, I'm also getting this error please help me link is http://stackoverflow.com/questions/40608309/copy-step-written-on-stackoverflow-to-install-ffmpeg-on-wamp-not-working – user3833682 Nov 16 '16 at 09:41
2

Copy all dll files from C:\wamp\bin\php\php5.5.12 to C:\wamp\bin\apache\apache2.4.9\bin

raksa
  • 898
  • 6
  • 17
  • This worked for me also. I had the needed dlls in the php folder but they were ignored, until I moved them to apache/bin. – jogi99 May 29 '18 at 11:10
0

I had this same and I enabled the rewrite_module in appache and it worked.

-3

append the following to the path of system variables

C:\wamp\bin\php\php5.5.12\ext;C:\wamp\bin\php\php5.5.12;.;
Jazi
  • 6,569
  • 13
  • 60
  • 92
KVG
  • 1