Run a php script using a batch file

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

Run a php script using a batch file

Postby naveenkongati » 08. April 2009 07:11

Hi,
I am using xampp 1.6.7 for windows. I want to run a php script file using a .bat file and same is also scheduled with windows scheduler.
I have written two like of code in batch file like this:

D:/xampp/php/php-win.exe
D:/xampp/htdocs/myapp/myscript.php

myscript.php will perform few database operations as on day.
Please suggest me where i am doing wrong
Thankx in advance
naveen
naveenkongati
 
Posts: 4
Joined: 21. February 2009 06:29

Re: Run a php script using a batch file

Postby naveenkongati » 08. April 2009 07:38

Now i have changed the batch file script to:
@D:\xampp\php\php-win.exe -f D:\xampp\htdocs\myapp\myscript.php
and getting the following error:
unable to load dynamic library D:\xampp\php\ext\php_pgsql.dll.
Application has failed to start because the application configuration is incorrect.
Thankx
Naveen
naveenkongati
 
Posts: 4
Joined: 21. February 2009 06:29

Re: Run a php script using a batch file

Postby Sharley » 08. April 2009 15:41

First, please delete your other topic viewtopic.php?f=16&t=34433 by clicking on the small X icon in your topic.
There is no need to double post as you will be answered in only one of the topics.



Second you need to uncomment the php_pgsql.dll extension for it to work.

Go to xampp\apache\bin folder and edit the php.ini file you will find there using a text editor like Notepad.

Look for this line:
;extension=php_pgsql.dll
Change it by uncommenting the line so it looks like this:
extension=php_pgsql.dll

Now save the file and restart Apache.

Try once again to run your batch file.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 95 guests

cron