chronister Posted September 2, 2008 Share Posted September 2, 2008 Hello All, I am trying to run a php script that is called from a bat file. I got that going and working correctly. The trouble is loading the mysql library with it. Here is the bat file that calls everything c:\php.exe -c c:\php.ini c:\test.php %1 c:\php.exe calls the php executable, -c c:\php.ini calls the php.ini file, c:\test.php is an argument to the php.exe part and loads test.php, %1 is a placeholder for the bat file argument. basically the bat file is called like this. The IP address is an argument to the bat file which then becomes an argument to the php file. callPhp.bat 192.168.3.22 I am trying to use this to update a mysql database that holds IP addresses for my work's stores. We have several that are dynamic and I am trying to streamline things here. I have the -c part to call the php.ini, and the php_mysql.dll is in the root of c and that is where I have specified it to load from Here is the php.ini file [code=php:0] extension_dir = "c:\" extension=php_mysql.dll Yes that is all of it. It is telling me that it cannot load extension c:\php_mysql.dll but that is where php_mysql.dll is. Has anyone had experience with loading libraries for command line use? Any help is appreciated. Link to comment https://forums.phpfreaks.com/topic/122450-solved-php-command-line-with-mysql/ Share on other sites More sharing options...
chronister Posted September 2, 2008 Author Share Posted September 2, 2008 I am going to close this thread... I found a program called bamcompile which will take a php script and compile it into a standalone exe. Made connection to my sql server right off the bat as it has the extension compiled into it already. Link to comment https://forums.phpfreaks.com/topic/122450-solved-php-command-line-with-mysql/#findComment-632268 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.