[PHP] Funny running PHP4 on Apache, Windows 95
I have this funny thing when running PHP 4 on Apache on Win95. If the script has the extension .php it's fine, but if the extension is .php3 it returns 400 Bad Server Request Any ideas? httpd.conf: DirectoryIndex index.html DirectoryIndex index.shtml DirectoryIndex index.htm DirectoryIndex index.php DirectoryIndex index.php3 AddType application/x-tar .tgz AddType application/x-httpd-php3 .php3 AddType application/x-httpd-php3-source .phps AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps === Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ In his heart a man plans his course, but the LORD determines his steps. -- Proverbs 16:9 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010110 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
RE: [PHP] Funny running PHP4 on Apache, Windows 95
Thanks, that works fine > -Original Message- > From: Brian Clark [mailto:[EMAIL PROTECTED]] > Sent: Thursday, 11 January 2001 14:15 > To: PHP is not a drug . > Subject: Re: [PHP] Funny running PHP4 on Apache, Windows 95 > > > > Hello Patrick, > > (PD == "Patrick Dunford") [EMAIL PROTECTED] writes: > > PD> I have this funny thing when running PHP 4 on Apache on Win95. If > PD> the script > > > > PD> AddType application/x-tar .tgz > PD> AddType application/x-httpd-php3 .php3 > PD> AddType application/x-httpd-php3-source .phps > PD> AddType application/x-httpd-php .php > PD> AddType application/x-httpd-php-source .phps > > Instead of all of those lines, try: > > AddType application/x-tar .tgz > AddType application/x-httpd-php .php .php3 > AddType application/x-httpd-php-source .phps > > -Brian > -- > Why do we ask rhetorical questions? > > > -- PHP General 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]
[PHP] Authentication through a login form
I want to replace the popup dialog box that occurs when a user accesses a password protected area, with a login screen. How do I do that? Someone told me I had to use a cookie to say the person is logged on and read it whenever I needed to verify their access. Is it possible to trap the request made to the browser for a username/password and then pass these back to the server whenever the server requires authentication? === Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ Blessed is the man who does not walk in the counsel of the wicked or stand in the way of sinners or sit in the seat of mockers. -- Psalm 1:1 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010125 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
[PHP] Running script on remote server
The PHP 4.0 manual contains this information: - Chapter 20. Using remote files As long as support for the "URL fopen wrapper" is enabled when you configure PHP (which it is unless you explicitly pass the --disable-url-fopen-wrapper flag to configure (for versions up to 4.0.3) or set allow_url_fopen to off in php.ini (for newer versions), you can use HTTP and FTP URLs with most functions that take a filename as a parameter, including the require() and include() statements. Note: You can't use remote files in include() and require() statements on Windows. For example, you can use this to open a file on a remote web server, parse the output for the data you want, and then use that data in a database query, or simply to output it in a style matching the rest of your website. - The example in the Help shows opening a file at http://www.php.net/ with fopen(). Are they accessing the source code of the script, or the HTML code that is output by the PHP server when it runs the PHP script that it loads from that location? What I want to be able to do is, to get around the problem that the server that I am running my site on does not have database, I want to run the database on another server elsewhere on the Web. I want to be able to, by fopen() -ing the page via its URL, to be passing some variables to the script, have the remote PHP server run the script and pass back to me the output as a file, which I can then load into my web page and display. ======= Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ You are all sons of God through faith in Christ Jesus, for all of you who were baptized into Christ have clothed yourselves with Christ. -- Galatians 3:26-27 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010316 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
Re: [PHP] header( )
On 11 Apr 2001 08:12:20 -0700 AD in php.general, Chris Lee said: >I'll post you a simple HTTP auth script. but you should realize = >something about header() > >client -> server >server -> client > >the client sends some HTTP request to the server, then the server sends = >some HTTP response to the client. php is strictly server side, you have = >full control over the HTTP headers sent to the user, but not from the = >user to the server. ie. method=3D'post' that is sending client data to = >the server, you will have no control over this at all... There are in fact two different servers: the web server and the PHP server. IMO it should be possible for the PHP server, executing PHP code, to send a request to the web server. It is certainly possible to send a header telling the web server to redirect to another web page. -- =========== Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ And my God will meet all your needs according to his glorious riches in Christ Jesus. -- Philippians 4:19 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010413 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
Re: [PHP] HTML and PHP?
On 13 Apr 2001 17:39:49 -0700 AD in php.general, Jason Caldwell said: >Is there a utility that I can use that will take a bunch of HTML and >encapsulate it in the PRINT command? > >i.e. > >PRINT("{html stuff}\n"); > >?? > >I have a ton of HTML pages that I want to make dynamic, but dread having to >type the PRINT command in front of every line of html, and let alone having >at manually add the slashes... urg. You don't need to make major changes to your HTML pages. Just embed the PHP into your HTML page wherever it's needed. Your web server will still treat a PHP page as an HTML except that the PHP code embedded in it is executed on the web server. However SSI commands will have to be replaced with their PHP equivalents. -- ======= Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ And my God will meet all your needs according to his glorious riches in Christ Jesus. -- Philippians 4:19 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010413 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
[PHP] PHP for Apache 2.0
According to Apache, modules made for Apache 1.3 will not work as-is in 2.0 due to changes in the API. Is a version of PHP 4 for Apache 2.0 coming out? -- === Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ Ill-gotten treasures are of no value, but righteousness delivers from death. -- Proverbs 10:2 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010414 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
Re: [PHP] Incrementing a String Name
On 22 Apr 2001 17:56:23 -0700 AD in php.general, Chris Aitken said: >Hi > >Just a quick puzzle I cant seem to get around at the moment... Why don't you put it in your own thread -- PHP General 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]
[PHP] Error: Can't redeclare already declared function (PHP 3.0.15)
I have a script (let's call it a.php3) that brings in another script b.php3 with the include or require call. In script b.php3 there is an include or require call to bring in script c.php3. Script a.php3 after making one and only one include (the include is not repeated anywhere in a.php3) then calls a function x which is defined in script b.php3. The first time the function is called it executes without any problems. The second time in which it is called, in exactly the same way, with the same parameters, it errors with the message Can't redeclare already declared function in c.php3 at line The function is not actually named in the error message. This is the code block in c.php3 which the error occurs: > function buildDirList($sourceDir,$recurse) { $subDirList=findAllDirsInDir($sourceDir); if (count($subDirList) != 0) $recurse=true; else $recurse=false; for($i=0; $i
RE: [PHP] SSI
The virtual( ) function is the same as #include on Apache If you're running a script, you may need to simulate the CGI variables as they aren't automatically available to a script that you would normally run with the #exec SSI directive. ===== Patrick Dunford, Christchurch, NZ http://pdunford.godzone.net.nz/ http://www.trainweb.org/ferrymead/ > -Original Message- > From: Gary [mailto:[EMAIL PROTECTED]] > Sent: Monday, 29 October 2001 14:59 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] SSI > > > Yes I do, it is to run a pre-exiting program. I figured it out. I was > uing double quotes in the ssi and excaping them when echoing. I should > of been using single quotes. > > Thanks > Gary > > Christian Dechery wrote: > > > At 19:04 28/10/01 -0500, Gary wrote: > > > >> How do you get a SSI to work on a php page? > > > > > > you don't need SSI if you're running PHP... just use include()... > > > > _ > > . Christian Dechery > > . . Gaita-L Owner / Web Developer > > . . http://www.webstyle.com.br > > . . http://www.tanamesa.com.br > > > > -- PHP General 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]
Re: [PHP] Image Resizing in PHP
On 29 Mar 2001 16:33:48 -0800 AD in php.general, YoBro said: >Hello, > >Is it possible to have PHP resize an image on the server? > >Example. >If I upload a JPG file at about 40KB at 600x480 Resolution, but I only want >to display it as a small thumbnail. But if clicking the thumbnail it then >opens in a new window the full size version. > >I have seen a auction site that I use, which is ASP and when I upload an >image to sell, i notice that it gives the thumbnail and the full size >images. How is this possible? > >Any links to sites on this subject would excellent. GDLib does this sort of thing, though I haven't tried it -- =========== Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ For this reason I kneel before the Father... I pray that out of his glorious riches he may strengthen you with power through his Spirit in your inner being, so that Christ may dwell in your hearts through faith. -- Ephesians 3:16-17 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010329 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
[PHP] PHP3: suppressing error messages
How can I prevent error messages from being displayed and sent to a log file instead? -- === Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, to him be glory in the church and in Christ Jesus throughout all generations, for ever and ever! Amen. -- Ephesians 3:20-21 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010331 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
[PHP] unset()
I wrote a function inside a file which I included with a require() call. The function takes four arguments by reference (because I need to pass back four values). The first thing it does is to call unset() four times to unset these arguments, so that it can enter new data into them. This will clear the variable values in the calling script of course, but is not a problem because the function needs to clear them so it can put data in them. However it was a surprise to find that the variables contained data when checked on the last line of the function, but when checked in the calling code after the function call had been made, they were empty. Removing the calls to unset() in the function resolved the problem and I have put the unset() calls into the calling code immediately before calling the function. This works but still leaves me with the question. -- === Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ Rejoice in the Lord always. I will say it again: Rejoice! -- Philippians 4:4 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010404 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
[PHP] header( )
Can someone explain "header" to me? Does it mean you can send HTTP headers with any script if you are loading another document? There are two possibilities that interest me: 1. Sending username and password for authorisation in a protected area. This of course is done by browsers when they get a 401 and ask the user for their username and password in a dialog box. I would like to ask them for the data in a form then send it to the page in question. 2. Passing in variables to a script without specifying them as part of the URL. Like a form that uses POST to submit variables to a script without them being displayed in the URL when the page loads. -- ======= Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/ If only for this life we have hope in Christ, we are to be pitied more than all men. -- 1 Corinthians 15:19 http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010411 === Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/ -- PHP General 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]
[PHP] Executing a CGI script from a PHP script
The server I am on uses a CGI script to get a count for home pages. With server side includes it is executed using the Apache "exec" SSO directive and works well. The problem with PHP is that the CGI script when executed by Apache sets a lot of environmental variables that apparently aren't set by the PHP script when using system() to run the CGI script. I wondered if there are any commands in PHP4 that will cause PHP/Apache to set the environmental variables the same way as it would when Apache executes a CGI script directly. -- ======= Patrick Dunford, Christchurch, NZ He makes me lie down in green pastures, he leads me beside quiet waters, he restores my soul. He guides me in paths of righteousness for his name's sake. -- Psalm 23:2-3 http://www.StudyLight.org/desk/?query=Psalm+23:2-3 -- PHP General 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]