Installation failed in Ghostscript on Windows XP - php

I want to convert PDF to images in PHP. For that I installed Ghostscript and also imagick but it's a failure. I am using a WAMP server.
If I run my code means it will not work so I didn't install the software successfully...
Can anyone please guide, how to install the Ghostscript on my WAMP server on Windows XP.
The past two days I was struggling for this installation. DLL file also failed.

The fact that your code doesn't work doesn't necessarily mean the software failed to install. In fact you haven't presented any evidence that it did fail. Did you get any error messages during installation ?
Can you run Ghostscript and ImageMagick from the XP command shell ? If not, what errors do you get ?
If the applications work from the command shell, then you have 2 obvious possibilities:
1) The environment is different when running your PHP server, you should check the PATH environment variable at the very least, but compare the entire environment you are using vs the command shell environment.
2) Your code has a bug which prevents it working. Again, do you get any error codes ?
The question as you've presented it can't be answered because there isn't enough iniformation. The only answer I can give to your question is 'use the Installer Luke'

Related

I'm getting an error in wamp about PHP path [duplicate]

This question already has answers here:
How To Run PHP From Windows Command Line in WAMPServer
(12 answers)
Closed 4 years ago.
When I start wamp it shows me this error about the PHP path but I don't even have this PHP version on my computer.
Sorry,
There is an error.
There is Wampserver path (c:/wamp64)
into Windows PATH environnement variable: (C:\wamp64\bin\php\php7.2.4)
It seems that a PHP installation is declared in the environment variable PATH
C:\wamp64\bin\php\php7.2.4
Wampserver does not use, modify or require the PATH environment variable.
Using a PATH on Wampserver or PHP version
is detrimental to the proper functioning of Wampserver.
Press ENTER to continue...
This are the versions that I have installed: 5.6.38, 7.0.32, 7.1.22, 7.2.10
I've already tried uninstalling and installing wamp again (even upgraded to the newest version), but still get the same error.
I've also already tried changing the Environment Variables PHP path like how it is suggested in this question I am getting error in wamp for PHP in path and it didn't work.
I can access the localhost page, the phpmyadmin page, everything seems to work fine but I keep getting this error.
EDIT: I don't understand why this was marked as duplicate. This question was about runing php from command line, mine was about an error, that just so happen to be about php and wamp as well. It has nothing to do with my question at all, and didn't answer any questions I might still have had.
I fixed it on my own.
I unistalled wamp, deleted the php path (like it says to do on the question I linked above), installed wamp again and then added back the php path (I don't think you have to do this last step, but I did it anyway. It was there, there might be a reason why? edit: it's there because composer needs it).
At first it still wasn't working. I had visual code opened when I did this because I was trying to roll back some migrations I had made before this error, but it was giving me another error (php command not found, or something like that), so I closed visual code, opened it again and it was working. edit: again, composer. I guess because I hadn't closed it, it didn't recognised I had added it back, but this error was because of composer
I still don't know what caused this error, since it was working the last time I checked, with no errors and I didn't change anything, but at least it's fixed.
I don't know if this was the best solution, but I hope it can help someone who is in the same situation as me!
Edit: I know wamp doesn't need the path, but from what I've read and from this experience, composer does.
WAMPServer does not set the PATH to contain a reference to it's potentially multiple versions of PHP and warns you with the error above that there is a potentially confusing situation on your system if it finds that someone has.
The confusion being that when you run the PHP CLI (Command Line Interface) you will be running the version of PHP referenced in the PATH environment variable. Remember this is only affecting the PHP CLI and not the version of PHP that runs with Apache!
Ok so why is it on the PATH anyway?
If people have attempted to install Apache and PHP manually the install of a Windows Standalone PHP will add the folder containing that version of PHP to the PATH.
You may have followed some bad advice and added a version of WAMPServers own PHP versions to the PATH.
What you should do to remove this error
All you need to do is remove ANY reference to ANY folder that contain a PHP executable from your Windows PATH environment variable.
Look at System Properties Heres how to get to those
So how do you run the PHP CLI for any version of PHP installed in WAMPServer
Here is How I do it, the batch file also includes using Composer and even PEAR is you want to. Amend that to suite you situation.
Wampserver decries it as error. But it's clearly more of a bug.
It's just a warning, that you can (and probably should) disable.
Wampserver insisting on managing the available PHP versions might be the proper thing to do from their perspective. It shouldn't prevent you from utilizing proper OS lookup features and having a shortcut to PHP CLI however.
The message itself, btw
[…]
Wampserver does not use, modify or require the PATH environment variable.
[…]
Using a PATH on Wampserver or PHP version is detrimental to the proper functioning of Wampserver.
is pretty vague as to how exactly it is "detrimental". Wether Wampserver uses mod_php or FPM shouldn't be affected by a PATH setting. It would be an issue with old-school CGI setups (but nobody is doing that anymore).
It's kinda bonkers that the message first claims that the environment variable is not used and required, but then goes off to make it sound harmful (without mentioning the concrete conflict).
Alternatively you can of course set up the recommended batch wrapper, and remove the versioned folder from your system environment PATH.
See also: http://forum.wampserver.com/read.php?2,151286,151424#msg-151425

Unable to connect sql server database with codeigniter on xampp with windows 7

I have an application where i need to connect my web (PHP based) application with desktop application database so that both desktop and web can communicate with each other.
On ubuntu OS connectivity is working fine but when i comes to windows 7 codeigniter sql server connectivity is not working.
i tried visual c++ redistributional packages as well as other instructions provided on many platforms but fails.
i also added extensions in php\ext and dll files as well as include that extensions like sql_serv55_nts like that but nothing is working.
last error that i am receiving is
application not be run as php5.dll is missing .
can some one help to figure this out as soon as possible and can send me proper tested procedure for this.
As you say you have installed the sql_serv55_nts version of the SQLServer libraries, this is your problem.
Instead install the TS (Thread Safe) version of the SQLServer libraries. XAMPP on windows runs Thread Safe.
The php5.dll is the Non Thread Safe version of php5ts.dll which is supplied with the XAMPP install of PHP.
Once you install the TS version of SQLServer libraries delete the php5.dll it is not required, also you got it from a source that you cannot be sure is safe. A simple rule of thumb If it was required it would have come with the XAMPP install.
NOTE: You should never need to copy anything related to Apache/PHP/MYSQL into the Windows system folders. If you do, when you come to install another version of XAMPP it will still be there and will cause you hours of debugging to find out why you are having odd issues.
ALSO: It is also dangerous adding anything XAMPP or WAMPServer related to the Windows PATH as this will also cause you issues when you come to update XAMPP/WAMPServer as you are bound to forget that this was done.
Try adding your php directory and your php extensions directory to your PATH environment variables.
I resolved issue in following way.
Install xampp with php 5.5
install microsoft re distributional package
download php5.ddl file from php5.dll
if window is 32 bit than just copy downloaded php5.dll into windows/system32
if you have 64bit window than you need to copy it into windows/SysWOW64 too.
best is to restart your PC
All done......

The program can’t start because php5ts.dll is missing from your computer [duplicate]

This question already has answers here:
program cant start because php5.dll is missing
(9 answers)
Closed 6 years ago.
I have a Win 2008 r2 server that has been running PHP 5.3 and convinced client to upgrade to 5.6.19 which is the latest available at the time of this post. This instance runs Apache 2.2.
Because I want to keep this instance lean but able to move back to 5.3 if I failed I downloaded the non-thread-safe version. I've updated the soon-to-be commissioned php.ini (formerly the example production file) to be aligned with the params in the 5.3 php.ini. Then I pointed the server's PATH from the 5.3 folder to the new one containing the 5.6.19 files. I have not attempted to run Apache yet opting instead to test that the new PHP works at least with CMD. That's when I got the above message.
It would seem the consensus of these posts:
http://www.touchoftechnology.com/the-program-cant-start-because-php5ts-dll-is-missing-from-your-computer-error/#ixzz42KMHyQFz
program cant start because php5.dll is missing
that I should rename the php5.dll file to 'ts' or 'nts' in its file name and/or add this designation in the php.ini. But I don't see where to put it in the .ini file. Renaming php5.dll (from the installation files) to php5nts.dll returns the message that php5.dll is missing. I've tried many different combinations of these filenames, and even adding a php5ts.dll from a thread-safe distribution. I can't get one without the other.
One of the posts suggests adding the 'nts' to some of the Zend extensions but I'm not running zend on this production box. Where in the php.ini do I need to set the file I got (php5.dll) to solve this? I hope once I get the CLI working that the Apache should not have this problem.
Other comments say to run Microsoft's Platform installer but that seems to introduce more things that are not needed on this production box and I do not want any extra baggage. I just want to point Windows and Apache to this newer PHP install.
I had read that for early Windows OS I should use the non-thread safe version of PHP. That version is missing the php5apache2_x.dll which caused doubt about this package. An acquaintance said to use the thread safe version which had the php5apache2_4.dll. It seemed to work in the Windows CMD browser after I set my environment variable to that folder. But digging further, it appears that I should also upgrade my Apache to 2.4 as later PHP and later Apache are using different Visual Studio compilers.

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.

Best PHP download to keep all my options open?

In the past, I used WAMPserver on windows to parse PHP for me. This is a pre-configured package, focussed on working with MySQL.
When I tried to run PostgreSQL, I got error messages that said that my version of PHP wasn't compiled to work with PostgreSQL.
So, I've recently uninstalled WAMP and every associated with it. I've downloaded Apache 2.2.11 with openSSL, installed as admin(you know, run the command prompt as administrator, cd to the directory where the download was done and have it executed, so the install was done as admin).
That's that. I now have Apache installed, "it works" shows up, so I'm that far.
Now I'm wondering, do I download the exe and install, or the zip, or something else.
What is the best thing to do to make sure that the PHP on my system can handle everything I can ever throw at it?
Also, PHP first, or MySQL/Postgre first.
And lastly, what about PEAR? I need PEAR installed, which isn't standard on Windows. I'm guessing the pear.bat file in the PHP downloads will do that for me?
EDIT: I see one close vote, yet no comment as to why. It makes me wonder how people who are so lazy and rude got to have somany points.
I would recommend downloading the zip package, as configuring php is not really that difficult, and it allows you to add features as needed.
As for whether first to install php or MySQL/PostgreSQL, - it does not really matter. You can install them in any order.
Your guess regarding PEAR is quite correct
i haven't used wamp before, so i can't comment on that
i do however use xampp which sounds very similar
in xampp if i want to enable postgres support i edit the php.ini file and uncomment the postgres section of the ini file, same with any of the extensions that i need
perhaps this might be an alternative you can try if you get stuck
There are many ways to setup a HTTP server/PHP/database machine. Sometimes the behaviour of your development setup will differ from the live server's.
I would recommend finding out the setup your web host is using, then getting a vmware appliance image that fits that as close as possible and get any additional software using it's package manager (which is easier that installing stuff on Windows).
Setup a file sharing link between the VM and the host, make sure you can view the VM's port 80 in a browser running in your host OS and you're set.

Categories