To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
yes, it's true. i've, along with what seems to be many thousands of others, am unable to get php4 and apache to be happy on a windows98 machine. i SWEAR i have done and followed proper procedure on the matter.
current thoughts :
- apache is working, .html runs just fine
- php is not
the errors i get when running a .php file is as such :
- a loud annoying 'beep!'
- a long pause then timeout
errors that i've managed to get in the past while dealing with this curse of satan :
- a prompt for download of the .php file vs. the loud beep and timeout
i almost know php.ini and httpd.conf are configured properly and i copied "PHP4TS.DLL" to windows/system ("MSVCRT.DLL" is already there) i followed :
- php.net/manual/install-windows95-nt.php
- c:\php\README.TXT
- delphi oracle (this lead me here)
- various other comments i've found while trying to solve this most frustrating issue
- related phpbuilder article
the problems, as i see it, are as such :
- most all documentation is for installing php3 vs. php4 and being that the procedure is different for the two, this confuses people, especially at first.
- php4 for windows is still beta
- windows.
- when i get frustrated i start doing stupid things and get in a pissy mood but don't worry, the gun ain't loaded.
i spent a quite few hours and am giving up for a few days/weeks as if i didn't i'd end up throwing this here monitor out the window. so i'm posting this as perhaps someone knows a helpful tip to get this going. i don't need this working to live as freeBSD is my friend but i'd like to know how. anyway, later i'll reread various posts and do this from scratch with the knowledge i've gained from this experience. i'm happy for trying as learning is good and will continue.
all tips and comments welcome, even obvious ones. afterwhich i'll begin a faq/tutorial on this, one specifically for php4.
Double check your httpd.conf make sure you've set ScriptAlias, AddHandler, and Action correctly. Also make sure everything is in the right path. If windows98 has a windows/system32 directory put PHP4TS.DLL in there. Make sure you restart your apache service too.
ScriptAlias /php/ "c:/php/"
- i am running php4
- .php extension is my desire
- this is the location of my php files
AddHandler text/html .php
AddHandler server-parsed .php
- did not see this in any documentation
- is this correct , went off .shtml example
Action application/x-httpd-php "/php/php.exe"
- this should be correct
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
- this should be correct
I have :
- have DLL's in both locations (system/system32)
- php.ini is located in c:windows
It displays the .php file but does not parse it so that
in the source i see <?php echo "blah"; ?> . when
I uncomment it, it prompts for download. This means
something, but what is my question ;)
Also, FYI, in php.inc I have :
extension_dir = "C:\php"
Looks like we're getting closer. BTW, after making changes
I just restart apache, do I ever have to restart computer (like
when I modify php.ini), just curious.
Oops... You shouldn't have any AddHandlers. Try commenting them out and restarting apache. You don't need to reinit anything after editing the php.ini file because php.exe parses it every time it is run and that is every time a script is run.
What I think may be the problem is that if the Action is set to "/php/php.exe", then Apache will look in C:/program files/php/php/php.exe, which does not exist =/.
I tried setting Action to "C:/program files/php.exe", but that didnt work either.
So I'm lost, cold and hungry, in the deep dark world of PHP/Apache/WinNT.I'm afraid that if I can't get this to work, I'll have to go back to ASP *shudder*:/
Any help would be greatly appreciated:/
And I really do think that they should release php/apache togther:)
cool. i didn't have those form handlers in before but i must have fixed something in the meantime as immediatly following the removel i got this error :
Not Found
The requested URL /php/php.exe/test.php was not found on this server.
which is, interesting. the link is properly placed but how php.exe got in there i do not know. the only instance of it's use is in httpd.conf here :
Action application/x-httpd-php "/php/php.exe"
and according to all documentation, this is correct. for good measure i removed the /php.exe and then got this error :
Not Found
The requested URL /php/test.php was not found on this server.
seems that is not the problem. for fun i created /php/php.exe/test.php but same error. sigh.
Very interesting...I've done almost exactly the same thing with nearly the same results (it doesn't work) except my error message is a bit different:
Bad Request
Your browser sent a request that this server could not understand.
Invalid URI in request GET /first.php HTTP/1.0
Now...explain that one? If I make a few tiny changes in the httpd.conf file for Apache I get a file not found thing. If I try to explicitly open the file in the browser (instead of entering the URL in the location textbox) it asks me if I want to Open the file or Save the file. If I opt to Open the file I see a PHP DOS box open and scroll a whole bunch of text by and close in the space of about 800ms.
Since my first.php contains only <?php phpinfo(); ?> I'm guessing what scrolls by is the info output itself, but why in the world is it appearing in the DOS box??? Of course, it might not be that, but since I can't actually see the text that scrolls by, I really don't know it isn't.
So, I suppose I'm not contributing anything to this discussion except a "me too" statement and a silly error message...I'd be willing to try stuff out though, perhaps we can tame this daemon...
I just give up the windows platform!
I try anything for apache + php4 + win32
especially for oracle extension. I think
the php.exe is not ok.
I change my platform to Linux+apache1.3.12+
php4.0.1pl2 and oracle is ok to connection . It's very simple to work.
Maybe I should recompiler the php4.0.lp12
for oracle ..... :(