Search the Community
Showing results for tags 'windows'.
-
Hello All, Have a GoDaddy MySQL PHP:PDO hosting questions. Using a database class to make script queries. Unfortunately, I'm required to use GoDaddy Windows hosting. However, I'm a Linux kind of guy. Here's the issue. The viewer script includes database credentials defined as constants, in a file outside the root directory. Typically, these constants are available to all sub processes including class objects. Everything works as expected on development server. The error message I get with version using constants: L226: projectGallery_class datapull Caught Exception --- invalid data source name with host string userDBName.db.6482519.hostedresource.com;dbname=userDBName However when I deploy to GoDaddy's production server, the constants are defined - but empty. Here is the example code. /* works on Linux */ class datapull { var $host; // not assigned here var $userName; // not assigned here var $userPass; // not assigned here protected function conn() { try { $DB = new PDO(DB_HOST,DB_UNAME,DB_PASS); $DB->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $DB; } catch( Exception $e ) { $mes = "L226: datapull::conn() Caught Exception --- "; $mes .= $e->getMessage(); error_log($mes); } } public function dbquery($qqueue) { $DB = (!isset($DB)) ? $this->conn() : $DB; /* some query stuff here */ return $result } The modified class for GoDaddy Windows class datapull { var $host = “mysql:host=userDBName.db.1234567.hostedresource.com;dbname=userDBName”; var $userName = “userDBName”; //godaddy user and database naming convention var $userPass = “userPWDString”; //user password protected function conn() { try { $DB = new PDO($this->host,$this->userName,$this->userPass); $DB->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $DB; } catch( Exception $e ) { $mes = "L226: datapull::conn() Caught Exception --- "; $mes .= $e->getMessage(); error_log($mes); } } public function dbquery($qqueue) { $DB = (!isset($DB)) ? $this->conn() : $DB; /* some query stuff here */ return $result }
-
Hi, I am trying to connect to a database using mysqli from a web developing software package called Sellerdeck. This software is purely windows based, it has PHP configured to a certain extent it seems. I ran the phpinfo(); command and can't find anything to do with MYSQL in the settings of the version. So i tried to download the php_mysql.dll and libmysql.dll files, I have referenced them in the php.ini file by using extension_dir="./" extension=php_mysql.dll extension=libmysql.dll (Also best to mention that " extension_dir="./" " was the only line of text in the php.ini file by default) This didn't seem to make a difference at all, still get the same error. Is there anything I can try to do? I really can't understand it as php 5 comes with mysql built in, but it seems that Sellerdeck have stripped that usability from the php version! Any advice appreciated
-
I have php on Windows 7 and I'm trying to connect to Samba Shared folder on Linux but no success. I'm using this code: // Map the drive system('net use Y: "\\\\linuxIPaddress\Shared_folder password /user:username /persistent:no>nul 2>&1'); // Open the directory $dir = "Y:/TMP"; if (is_dir($dir)) { if (opendir($dir)) { print "able to access directory tree."; } } else { print "not access tree."; }
-
Hi everyone. i am having problems loading zend framework 1.12 to my windows 7 i keep getting this error message: "php.ex" is not recognized as an internal or external command, operable program or batch file". perhaps it will be easier if i tell you how i installed it and someone can please tell me where i have gone wrong. i installed Zend Librairies and bin in the following folders in my laptop ( windows 7) : C:\wamp\bin\php this bin folder is the same folder that my PHP5.43 is held in. The Zend is held in a folder called: zendframwork i then went to my php.ini folder ( includes path- ) and inserted the following: include_path = ".;C:\wamp\bin\php\zendframwork1.12\library" i then went to change my advanced windows settings: once there, i clicked onto Environment Variables , then to System variable where i double clicked on to paths line. in the paths line i include the path to the bin folder for the zend bin ie: Control Panel\System and Security\System ;C:\wamp\bin\php\zendframwork1.12\bin i then ok' ed everything and then went to my windows powershell interface. i.e "Administrator: Windows Powershall" once there i typed in zf ( i did this to test whether the system would recognize that zend has been install. ) however, i keep getting the following message: "php.ex" is not recognized as an internal or external command, operable program or batch file". Can someone please tell me what this message means and what i need to do to correctly configure Zend on my machine. warm regards Andreea
-
My Knowledge base is; I can get around in php, I have never worked with C, C++, C# or any compilers. I Upgraded from XAMPP 1.7.3, which used php 5.3, to 1.8.1 which includes: Apache 2.4.3 MySQL 5.5.27 PHP 5.4.7 It is being installed on Windows 7 Pro, Windows XP Pro and Windows Server 2008 r2. But I am trying to get it to working on Windows 7 currently. I upgraded because I needed a newer version of Apache and MySQL for security reasons. I do not have the option to downgrade. I use the php_printer.dll for the ability to print raw data to the printer: printer_set_option($handle, PRINTER_MODE, "RAW"); My Code worked fine in PHP 5.3 but broke in PHP 5.4. After receiving the error: " Fatal error: Call to undefined function printer_open() in ~". I checked the php_error_log and received the following information. PHP Warning: PHP Startup: printer: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20100525 These options need to match I've looked for hours trying to find a pre-compiled php_printer.dll for PHP 5.4.7 to no avail. I have concluded that I will have to compile it from source files in the PECL. pecl.php.net/package/printer Having never had to do this before I did what any internet user should do. I googled it and found some information here: https://wiki.php.net/internals/windows/stepbystepbuild It took me all day but the PHP build worked. But then tried to create the php_printer.dll following the dbase example. First I tried : svn co http://svn.php.net/repository/pecl/printer/trunk pecl/printer But it said: 'svn' is not recognized as an internal or external command, operable program or batch file. So I just downloaded the files myself from: svn.php.net/repository/pecl/printer/trunk/ and put them in: C:\php-sdk\php54dev\vc9\x86\php5.4-201303311430\ext\printer The files: config.w32 CREDITS.txt php_printer.h printer.c printer.dsp printer.php Tried it both With printer.php and with out. I made sure to download the libraries both from: windows.php.net/downloads/php-sdk/deps/vc9/x86/ Also just the deps file: deps-5.4-vc9-x86.7z I tried the deps file alone and then added the other, however; every time I received the following when I tried to nmake: c:\php-sdk\php54dev\vc9\x86\php5.4-201303311430>nmake Microsoft (R) Program Maintenance Utility Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved. printer.c ext\printer\printer.c(266) : error C2065: 'pval' : undeclared identifier ext\printer\printer.c(266) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(266) : error C2100: illegal indirection ext\printer\printer.c(266) : warning C4552: '*' : operator has no effect; expect ed operator with side-effect ext\printer\printer.c(267) : error C2275: 'printer' : illegal use of this type a s an expression c:\php-sdk\php54dev\vc9\x86\php5.4-201303311430\ext\printer\php_printer. h(78) : see declaration of 'printer' ext\printer\printer.c(267) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(269) : error C2143: syntax error : missing ';' before 'typ e' ext\printer\printer.c(271) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(271) : warning C4047: '=' : 'int' differs in levels of ind irection from 'printer *' ext\printer\printer.c(272) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(272) : error C2223: left of '->dmModifiedFields' must poin t to struct/union ext\printer\printer.c(274) : error C2065: 'argc' : undeclared identifier ext\printer\printer.c(274) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2224: left of '.type' must have struct/union type ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : warning C4047: 'function' : 'zval *' differs in lev els of indirection from 'int' ext\printer\printer.c(275) : warning C4024: 'zval_isref_p' : different types for formal and actual parameter 1 ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : warning C4047: 'function' : 'zval *' differs in lev els of indirection from 'int' ext\printer\printer.c(275) : warning C4024: 'zval_refcount_p' : different types for formal and actual parameter 1 ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : warning C4047: 'function' : 'zval *' differs in lev els of indirection from 'int' ext\printer\printer.c(275) : warning C4024: 'zval_delref_p' : different types fo r formal and actual parameter 1 ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2223: left of '->value' must point to struct /union ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2224: left of '.type' must have struct/union type ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : warning C4047: '=' : 'int' differs in levels of ind irection from 'zval *' ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : error C2223: left of '->type' must point to struct/ union ext\printer\printer.c(275) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(275) : error C2100: illegal indirection ext\printer\printer.c(275) : warning C4047: 'function' : 'zval *' differs in lev els of indirection from 'int' ext\printer\printer.c(275) : warning C4024: '_convert_to_string' : different typ es for formal and actual parameter 1 ext\printer\printer.c(276) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(276) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(276) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(276) : error C2100: illegal indirection ext\printer\printer.c(276) : error C2100: illegal indirection ext\printer\printer.c(276) : error C2224: left of '.value' must have struct/unio n type ext\printer\printer.c(278) : error C2065: 'argc' : undeclared identifier ext\printer\printer.c(279) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(279) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(285) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(285) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(285) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(285) : error C2223: left of '->handle' must point to struc t/union ext\printer\printer.c(285) : error C2198: 'OpenPrinterA' : too few arguments for call ext\printer\printer.c(286) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(286) : error C2223: left of '->pi2' must point to struct/u nion ext\printer\printer.c(287) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(287) : error C2223: left of '->pi2' must point to struct/u nion ext\printer\printer.c(287) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(287) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(287) : error C2198: 'DocumentPropertiesA' : too few argume nts for call ext\printer\printer.c(288) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(288) : error C2223: left of '->handle' must point to struc t/union ext\printer\printer.c(288) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(288) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(288) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(288) : error C2223: left of '->pi2' must point to struct/u nion ext\printer\printer.c(288) : warning C4047: 'function' : 'LPSTR' differs in leve ls of indirection from 'int' ext\printer\printer.c(288) : warning C4024: 'DocumentPropertiesA' : different ty pes for formal and actual parameter 3 ext\printer\printer.c(288) : error C2198: 'DocumentPropertiesA' : too few argume nts for call ext\printer\printer.c(289) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(289) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(290) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(290) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(291) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(291) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(292) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(292) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(293) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(293) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(293) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(293) : error C2223: left of '->info' must point to struct/ union ext\printer\printer.c(294) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(294) : error C2223: left of '->dc' must point to struct/un ion ext\printer\printer.c(294) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(294) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(294) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(294) : error C2223: left of '->pi2' must point to struct/u nion ext\printer\printer.c(294) : error C2198: 'CreateDCA' : too few arguments for ca ll ext\printer\printer.c(295) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(295) : warning C4022: 'zend_register_resource' : pointer m ismatch for actual parameter 2 ext\printer\printer.c(299) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(299) : error C2223: left of '->name' must point to struct/ union ext\printer\printer.c(310) : error C2065: 'pval' : undeclared identifier ext\printer\printer.c(310) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(310) : error C2100: illegal indirection ext\printer\printer.c(310) : warning C4552: '*' : operator has no effect; expect ed operator with side-effect ext\printer\printer.c(311) : error C2275: 'printer' : illegal use of this type a s an expression c:\php-sdk\php54dev\vc9\x86\php5.4-201303311430\ext\printer\php_printer. h(78) : see declaration of 'printer' ext\printer\printer.c(311) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(313) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(317) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(317) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(317) : warning C4047: 'function' : 'zval **' differs in le vels of indirection from 'int' ext\printer\printer.c(317) : warning C4024: 'zend_fetch_resource' : different ty pes for formal and actual parameter 1 ext\printer\printer.c(317) : warning C4047: '=' : 'int' differs in levels of ind irection from 'printer *' ext\printer\printer.c(317) : error C2065: 'resource' : undeclared identifier ext\printer\printer.c(319) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(319) : error C2100: illegal indirection ext\printer\printer.c(319) : error C2100: illegal indirection ext\printer\printer.c(319) : error C2224: left of '.value' must have struct/unio n type ext\printer\printer.c(319) : warning C4047: 'function' : 'int' differs in levels of indirection from 'void ***' ext\printer\printer.c(319) : warning C4024: '_zend_list_delete' : different type s for formal and actual parameter 1 ext\printer\printer.c(319) : error C2198: '_zend_list_delete' : too few argument s for call ext\printer\printer.c(328) : error C2065: 'pval' : undeclared identifier ext\printer\printer.c(328) : error C2065: 'arg1' : undeclared identifier ext\printer\printer.c(328) : fatal error C1003: error count exceeds 100; stoppin g compilation NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\ VC\Bin\cl.exe"' : return code '0x2' Stop. If some one is set up to compile this DLL for 5.4.7 I would greatly appreciate it.
-
First time poster so please take it easy on me. I am developing on a windows 7 machine with WAMP Server running and no configuration changes from the defaults. IIS is turned off. In my site I have a class method to record actions taken by the user. During this method I obtain a timestamp in unix and save it to the database. On the Dev machine, this works fine but when I put it online I get an error. HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request. I traced the issue through the code to this point: // get date stamp $date = date_create(); $datestamp = date_timestamp_get($date); // ERROR HAPPENS HERE I have tried this method and the OOP method and works fine locally, but fails on my full server which is a windows server running IIS. I have painstakenly checked the PHPINFO.php for discrepancies but can't see anything that would affect this setting - any help would be really appreciated. Kind Regards Michael
-
all, I have a rather interesting question here. I'm wondering if there are any stumbling blocks associated with doing this...?? Anyone know? I wouldn't see how there could be unless the computer on which you were doing it was infected with something. So for instance if I had a small PHP script in another application (say MS Word) and I used the clipboard as a medium to transfer it into my development environment, is there any risk with that do you guys think?? I don't see much but I've never asked. Thought you guys here might be interested in this one. thanks.