Ok. I installed PHP v5 and Apache 2 on my computer. I set it up because I want to run PHP scripts on my computer. I need a bigger max upload size in my php.ini setting. So I changed it in all the php.ini files I had on my computer. I run Apache and type in my php page to see my php info and it always says that the max upload size is 2mb, not what I set it too.
when you change any settings in your php.ini or httpd.conf files, you need to restart apache to make the new settings take effect.
I loaded the code to find out my php info and located the directory where it said it was using the php.ini file from. I deleted it and restarded apache to see what would happen. And it still works!!
Apache does not need your php.ini file for it to start. The php.ini file just tells apache how php is configured to run on your server. The only thing that will happen by deleteing your php.ini file is you will not be able to use php scripts.
Also, whenever I start apache I get this error message. But apache still works and runs fine.
a possible reason that apache starts but gives error messages is that you had two entries in your code above for
AddType application/x-httpd-php .php. Remove one of them. Also, change
ScriptAlias /php/ "c:/php/" to
Alias /php/ "c:/php/". And I would add an AddHandler to handle php scripts.
Also, to be safe, I woud use AddType to make apache process include files (.inc) and php source files (.phps), otherwise, if someone tries to access those pages with their browser, they will see your php source code, not the parced php webpage.
Here is how the new code should look:
Code: Select all
Alias /php/ "c:/php/"
AddHandler php-script .php
AddHandler php-script .inc
AddType application/x-httpd-php .php
AddType application/x-httpd-php .inc
AddType application/x-httpd-php-source .phps
CyberSpatium