php-windows Digest 8 May 2001 15:35:09 -0000 Issue 586 Topics (messages 7342 through 7357): Extensions 7342 by: Andrés García Php & Oracle 8.1.1.6 Release 2 & Windows NT Novice Php Question 7343 by: Jimi 7345 by: Paco Ortiz Re: Installing PHP4 for PWS 7344 by: RJ Re: PHP 4.0.4pl1 ISAPI/CGI, IIS 5.0 ... 7346 by: Phil Driscoll Apache + PHP on Win2K 7347 by: macky 7348 by: Darren Can execute C program with PHP? 7349 by: cecchini fread() and windows directory permissions 7350 by: Benjamin Listwon 7351 by: Alessio Bernesco Làvore PHP and HTML 7352 by: Jordy 7353 by: Alessio Bernesco Làvore 7356 by: mailinglists.web.de Installing PHP on PWS4.0 7354 by: Vern DeHaven 7357 by: Phil Driscoll Assing NT user to PHP cgi Process. 7355 by: Alessio Bernesco Làvore Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] ----------------------------------------------------------------------
Hi all, I have the next error: Fatal error: Call to undefined function: mssql_connect() in c:\inetpub\wwwroot/php/insico/mm2.php on line 2 If I wish to have an extension php_mssql70.dll loaded automaticly in php.ini X-Powered-By: PHP/4.0.4pl1 Content-type: text/html Fatal error: Call to undefined function: mssql_connect() in c:\inetpub\wwwroot/php/insico/mm2.php on line 2 PHP Warning: Unable to load dynamic library 'c:\php\extensions/php_mssql70.dll' - No se puede hallar uno de los archivos de biblioteca necesarios para ejecutar esta aplicación. in Unknown on line 0 Where can I get the php_mssql70.dll file? Any suggestions? Thanks Andrés García
Hi, I am running Windows NT 4.0 Serv PK 6a, IIS 4.0 & PHP i am making the transition from ASP to PHP, I would like to know how i can use PHP with Oracle? Could someone breifly explain how i can set up PHP to connect to an Oracle Database? Sean
hi: 1. install Oracle 8.1.6 R2 client libraries on your windows machine 2. configure NET8 in order to connect to the Oracle instance 3. install PHP with support for oracle8 enabled (using php_oci8.dlll). Check it with phpinfo(); 4. use PHP OCI* funtions. In OCILogon, use the service name you configured within NET8 as "database" I works for me. Hint: try to use PHP as ISAPI filter, for persistent connections. Don't use it as CGI (slow due to connection latency). If PHP as ISAPI filter is not stable enough for you, you might consider to use Apache, not IIS. Greetings, F.J. Ortiz
Hi, Okay I kind of had this problem. In fact I still do sometimes. In my case it involves a strange ritual with PWS!!! I usually Open up the PWS manager - make sure service is stopped - then goto ADVANCED tab (where you see all the directories) and then select each folder/dir one by one and choose EDIT-Properties. Just in case, make sure read/executed is selected. But I'm pretty sure it already is. Anyway after opening the properties window, either click on "OK" or "CANCEL", it does not matter which. Start the service and it works (for me at least), Hope that was helpful (it IS strange though) RJ ----- Original Message ----- From: "Sven Östring" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, May 03, 2001 11:29 AM Subject: [PHP-WIN] Installing PHP4 for PWS Hi, I found David Fischer's step-by-step instructions at http://www.faqts.com/ for installing PWS and PHP on my local machine to be very helpful. However, I'm getting the following error when I try to access .php files: [403.1 Forbidden: Execute Access Forbidden: This error can be caused if you try to execute a CGI, ISAPI, or other executable program from a directory that does not allow programs to be executed.] I have set up my PWS manager to read/execute/script from my PHP directory and have the correct association in HKEY_LOCAL_MACHINE to the php4isapi.dll in the php/sapi/ directory. Is there any other place where I need to make the PHP directory executable? Thanks,
>"CGI Error >The specified CGI application misbehaved by not returning a complete set of >HTTP headers. The headers it did return are:" (and nothing else) This is the error message that IIS spits out if it tried to run a cgi program and no output was produced. It occurs normally when php cannot run for some reason (misconfiguration, permissions, script didn't exist) etc. In the internet services manager if you tick the 'check if file exists' button you can at least cause the missing script file error to return a 404 instead, and get iis to do authentication for you if file permissions on the script file are set higher than the anonymous IIS user. I use the cgi version of php all the time and I never set doc_root to anything - it always works ok for me. I think that the %s %s stuff is a throwback to an earlier version of php and is definitely not required any more. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
Im new to APACHE I already installed APACHE on Win2K and it works well.... Can anyone tell how to enable.. PHP on Win2K? meaning able to execute .php pages... <%php echo "FOO VAR"; %> -- ---------------------------------------------------------------------- The information contained in this message (including any attachments) is confidential and intended solely for the attention and use of the named addressee(s). It must not be copied, distributed nor disclosed to any person. If you are not the intended recipient, please delete it from your system and notify sender immediately. Any disclosure, copying or distribution thereof or any action taken or omitted to be taken in reliance thereon is prohibited and may be unlawful. ----------------------------------------------------------------------
"macky" <[EMAIL PROTECTED]> wrote in message 9d8dn8$mre$[EMAIL PROTECTED]">news:9d8dn8$mre$[EMAIL PROTECTED]... > Im new to APACHE > > I already installed APACHE on Win2K and it works well.... > > Can anyone tell how to enable.. PHP on Win2K? > meaning able to execute .php pages... > > > <%php > echo "FOO VAR"; > %> did you download the manual as well? The instructions say General Installation Steps The following steps should be performed on all installations before the server specific instructions. Extract the distribution file to a directory of your choice. "C:\PHP\" is a good start. Copy the file, 'php.ini-dist' to your '%WINDOWS%' directory and rename it to 'php.ini'. Your '%WINDOWS%' directory is typically: c:\windows for Windows 95/98 c:\winnt or c:\winnt40 for NT servers Edit your 'php.ini' file: You will need to change the 'extension_dir' setting to point to your php-install-dir, or where you have placed your 'php_*.dll' files. ex: c:\php If you are using Omni Httpd, do not follow the next step. Set the 'doc_root' to point to your webservers document_root. ex: c:\apache\htdocs or c:\webroot Choose which modules you would like to load when PHP starts. You can uncomment the: 'extension=php_*.dll' lines to load these modules. Some modules require you to have additional libraries installed on your system for the module to work correctly. The PHP FAQ has more information on where to get supporting libraries. You can also load a module dynamically in your script using: dl("php_*.dll"); On PWS and IIS, you can set the browscap.ini to point to: 'c:\windows\system\inetsrv\browscap.ini' on Windows 95/98 and 'c:\winnt\system32\inetsrv\browscap.ini' on NT Server. Additional information on using the browscap functionality in PHP can be found at this mirror, select the "source" button to see it in action. The DLLs for PHP extensions are prefixed with 'php_'. This prevents confusion between PHP extensions and their supporting libraries. Windows 9x/NT and Apache 1.3.x You must edit your srm.conf or httpd.conf to configure Apache to work with the PHP CGI binary. Although there can be a few variations of configuring PHP under Apache, this one is simple enough to be used by the newcomer. Please consult the Apache Docs for further configuration directives. ScriptAlias /php/ "c:/path-to-php-dir/" AddType application/x-httpd-php .php AddType application/x-httpd-php .phtml Action application/x-httpd-php "/php/php.exe" To use the source code highlighting feature, simply create a PHP script file and stick this code in: <?php show_source ("original_php_script.php"); ?>. Substitute original_php_script.php with the name of the file you wish to show the source of. (this is only one way of doing it). Note: On Win-Apache all back slashes in a path statement such as: "c:\directory\file.ext", must be converted to forward slashes. I followed these and it still didn't work as a dll was missing. However i installed pws and mysql too then apach worked again this time with php
Can execute C program with PHP?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all, I am trying to read a directory on a Win2K installation of PHP4 and Apache 1.3. The following is the code I have to read in a directory. $dirname = "c:/temp"; $dirhandle = fopen($dirname, "r"); $dircontents = fread($dirhandle, filesize($dirname)); fclose($dirhandle); This seems to work fine under Linux, but when I first tried it under Windows it gave an error about not having the permissions to read. I later discovered that I needed the directory to be on an NTFS partition (POSIX compliant) so I moved it to one. I then applied all necessary permissions, but the fread() still gets the same error, and printing the permissions of the directory is the same as it was before. I even tried running Apache as a service under the Administrator logon, which should in theory allow it to do everything I can, but the problem was still the same. My question. A) am i going about this all wrong? B) what can be done to actually read the directory? Thanks in advance. - --nettles -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com> iQA/AwUBOvfYmdJHHObB9LWkEQJZzwCfTYOmxX6349lg8TTLHUnjS+HQW7QAoNmA uuqylewvfv52bdG8XAHtuQiU =LOnd -----END PGP SIGNATURE-----
I think you could not use fopen to open just a directory, without specify a file. Instead try to use: $handle=opendir('mydir'); while ($file = readdir($handle)) { echo "$file\n"; } closedir($handle); Bye, Alessio ""Benjamin Listwon"" <[EMAIL PROTECTED]> ha scritto nel messaggio 9d8l8b$74i$[EMAIL PROTECTED]">news:9d8l8b$74i$[EMAIL PROTECTED]... > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hello all, > I am trying to read a directory on a Win2K installation of PHP4 and > Apache 1.3. The following is the code I have to read in a directory. > > $dirname = "c:/temp"; > $dirhandle = fopen($dirname, "r"); > $dircontents = fread($dirhandle, filesize($dirname)); > fclose($dirhandle); > > This seems to work fine under Linux, but when I first tried it under > Windows it gave an error about not having the permissions to read. I > later discovered that I needed the directory to be on an NTFS > partition (POSIX compliant) so I moved it to one. I then applied all > necessary permissions, but the fread() still gets the same error, and > printing the permissions of the directory is the same as it was > before. > > I even tried running Apache as a service under the Administrator > logon, which should in theory allow it to do everything I can, but > the problem was still the same. > > My question. A) am i going about this all wrong? B) what can be done > to actually read the directory? > > Thanks in advance. > > - --nettles > > -----BEGIN PGP SIGNATURE----- > Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com> > > iQA/AwUBOvfYmdJHHObB9LWkEQJZzwCfTYOmxX6349lg8TTLHUnjS+HQW7QAoNmA > uuqylewvfv52bdG8XAHtuQiU > =LOnd > -----END PGP SIGNATURE----- > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Hi there, I have Php 4.0.5 and Apache Web Server, It all works fine when I open php files, but when I open html file with php scripts in it, it doesn't work I just simply see the normal html but without any scripts.. as it doesn't use PHP in HTML .. could someone please help!!! Thx mail it to [EMAIL PROTECTED] Jordy
Wath did you mean with "html pages"? Have you set the extensions of these pages as .php? Bye, Alessio. ""Jordy"" <[EMAIL PROTECTED]> ha scritto nel messaggio 9d8qbe$934$[EMAIL PROTECTED]">news:9d8qbe$934$[EMAIL PROTECTED]... > Hi there, > I have Php 4.0.5 and Apache Web Server, > It all works fine when I open php files, but > when I open html file with php scripts in it, it > doesn't work I just simply see the normal html but without any scripts.. as > it doesn't use PHP in HTML .. could > someone please help!!! > > Thx > mail it to [EMAIL PROTECTED] > > Jordy > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
On a standard Apache you cannot just put php scripts in html files, since the apache won't pass them on to the php-interpreter. However it is probably not true, that the files come without the php-code. You just cannot see it in the Browser since it is hidden inside <?php...?> tags. But if you look at the sourcecode of the page your borwser is displaying you're likely to see your complete php-source in there as well. So just rename your files to an extension that is interpreted as php and everything should wqork fine. (ususally .php or .php4) I know that there is a problem if you want to have a php page as your default page, since most webhosters will accept only index.htm(l) for that. Don't know a clean way how to get round this problem though (without having to use redirects or similar things in the index.html) > -----Original Message----- > From: Jordy [mailto:[EMAIL PROTECTED]] > Sent: Dienstag, 8. Mai 2001 14:57 > To: [EMAIL PROTECTED] > Subject: [PHP-WIN] PHP and HTML > > > Hi there, > I have Php 4.0.5 and Apache Web Server, > It all works fine when I open php files, but > when I open html file with php scripts in it, it > doesn't work I just simply see the normal html but without any > scripts.. as > it doesn't use PHP in HTML .. could > someone please help!!! > > Thx > mail it to [EMAIL PROTECTED] > > Jordy > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] >
Sorry if this is a beaten horse, but I've looked everywhere I can think of for this answer. I have PHP installed over PWS4.0 on Win98 (I know, I know, my boss isn't a developer and won't give in to our screams of despair). I've added the registry entry correctly over and over: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Script Map] ".php"="C:\\PHP\SAPI\\php4isapi.dll" to different folders all of which are in my PATH. I've tried both the CGI executable and ISAPI extension. Here's the result with my test .php in every case: "One of the library files needed to run this application cannot be found." (Code is just <?php phpinfo() ?>) I've tried placing every .dll and .lib into my \Windows and \Windows\System folders, pointing the registry entry to the folder I unzipped to, blah, blah, blah... PHP works fine with OmniHTTPd (also installed on my system after all my PWS woes) Unfortunately, I can't go out and buy ChiliASP to go along with it. I need the PWS/ASP/ColdFusion/PHP combination. A thousand thanks shall fall upon you, Vern DeHaven ===== Gravity is a wonderful bend of time. Just ask someone who shreds. __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Firstly the ISAPI module won't work well with PWS so go for the cgi installation using php.exe instead. If that doesn't work, run php.exe -i from the command line, and the error messages displayed will tell you what's wrong. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org
(Win NT 4.0, IIS 4.0) Hi, I've made a script to create some sub-folders to my web root. To turn around security problems (like set the root or another sub-folder as "Everyone change") I would like to create and use an NT user to assign to the PHP process and then assign security permission just for this user. At worst i'll use "IUSR_myserver" but I'll prefer to use a dedicated user. Have some one an idea to do that? Thanks, Alessio