unable to run php cli in DOS when not at installation drive

Problems with the Windows version of XAMPP, questions, comments, and anything related.

unable to run php cli in DOS when not at installation drive

Postby chavz27 » 12. June 2013 14:56

Hi, i cant seem to run php cli from the command line when my current path drive is not the same with the xampp installation drive.

i've posted a question on stackoverflow.com

http://stackoverflow.com/questions/17048329/unable-to-run-php-cli-from-the-command-line-when-xampp-portable-is-installed-in

please do refer to it for the full scenario. tnx.
chavz27
 
Posts: 2
Joined: 12. June 2013 14:17
XAMPP Version: 5.6.3
Operating System: windows xp 32bit

Re: unable to run php cli in DOS when not at installation dr

Postby Altrea » 12. June 2013 15:45

Hi chavz27,

chavz27 wrote:i've posted a question on stackoverflow.com

http://stackoverflow.com/questions/1704 ... stalled-in

please do refer to it for the full scenario. tnx.

No. That is what we call cross posting. Don't post your problem to multiple support channels.
Your posting here is nearly without any value for the other community members without your full information.
What if the stackoverflow informations are not accessible forever from that url?

So: Choose the correct support channel relating to your issue and don't post it to multiple of them!

http://stackoverflow.com/questions/17048329/unable-to-run-php-cli-from-the-command-line-when-xampp-portable-is-installed-in wrote:I have installed a xampp portable package on my drive D, added the php folder path inside it on the system environment so I would be able to run php basically anywhere from the command line. but when i try to check if its working by executing the "php -v" command, it runs but i get this following error/warning messages.

"Warning: PHP Startup: Unable to load dynamic library 'xampp-portable\php\ext[:any].dll - The specified module could not be found."

*the [:any] there just means some dll filename.

and i get a lot of that warnings with just varying dll filenames,

anyway, here's the catch. when i do change my current path in the command line to somewhere in drive D, and then run the same command "php -v" it runs smoothly.

so what configuration should i do to fix this problem?

by the way, i do the same with mysql, putting its bin directory path on the system enviroment, run it in both inside drive C and drive D. and it runs smoothly. so i guess this problem is only on php.

XAMPP is very proud that it don't have to set any environment variables or registry values.

What you want to do is not possible with XAMPP portable without mapping to a specific Drive letter.
All configurations in xampp portable have relative paths, so if you want to use cli from a different drive letter, php can be executed, but all extensions of them throw errors.

I would install the full version of XAMPP, map it to the current drive letter with help of the setup_xampp.bat file and use the XAMPP control panel Shell instead of default command line (advantage: The XAMPP control panel shell sets local include paths to the needed XAMPP folders).

Works for me (i can even use pear, git, composer, and other cli scripts with the Xampp Shell if correct integrated).

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6752
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: unable to run php cli in DOS when not at installation dr

Postby chavz27 » 12. June 2013 16:03

Hi Altrea,

I'm terribly sorry for what i've done there, seems like I still have many things to learn when it comes to forums rules, i'll be learning from this mistake and hopefully not repeat it again. Anyway thanks for your quick response, and i'll be just doing your advice, thank again.

Regards,
chavz27
chavz27
 
Posts: 2
Joined: 12. June 2013 14:17
XAMPP Version: 5.6.3
Operating System: windows xp 32bit


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 62 guests