PHP Installation & Configuration

I've just installed PHP v5.2.0 from the Ports, made the system, etc. The Make did not create a php.ini file. I've Googled and found a comment from someone (can't remember where) that PHP v5+ does not make a php.ini file ??? Is this true? If so, then I don't understand where to begin to configure PHP per applications that requires PHP (FYI, a calendar and forum.)

BTW, this is my first dance with PHP.
 
hi rtwingfield,
mines are in /usr/local/etc
but from man php it seems that you can tell where: --php-ini path|file or -c path|file
i have php 5.3.
hope this help
cheers
cuq
 
It does copy the two example files php.ini-development and php.ini-production to your /usr/local/etc, and from these you can either copy them directly as your php.ini file(remove the -dev|-prod part) or create your own. If you are just starting out with PHP I would suggest that you just copy the development file and leave it as is.

Note that these are global configuration for PHP and any per application settings has to be set in you apache server, but that is not something that you would do until you are very familiar with it.
 
Thanks for the suggestion. Actually . . .FYI, the two distribution files are [font="Courier New"]php.ini-dist[/font] and [font="Courier New"]php.ini-recommended[/font]. I copied the [font="Courier New"]php.ini-recommended[/font] to [font="Courier New"]php.ini[/font], stripped it down and made some changes as indicated for the SMF(forum) system that I'm attempting to install. I'm still having some PHP/MySQL configuration problem, though, with the [font="Courier New"]./SMF/install.php[/font] failing. I'm pursuing that problem via the SMF forum.http://www.simplemachines.org/community/index.php?topic=396672.0
 
From the SMF Forums, it seems that PHP is not configured with Mysql correctly. The TestDB page should only contain "phpinfo();" and nothing else to start with. If you open the testDB.php page on your browser, you should see a section on Mysql if you have configured PHP with Mysql correctly.

You can use php -i|grep mysql to check if you have mysql correctly configured. Also it would make sense to check if you ahve the mysql extension for PHP installed (pkg_info | grep php5-mysql)
 
In fact I have found (and should have posted sooner) that the php-extensions were not complete because the make had failed to complete successfully with regard to php sessions, [font="Courier New"]session_start()[/font], et al? I have installed [font="Courier New"]WebCalendar[/font] on a FreeBSD v7.2 box and all seems well. As soon as the mail server is working on the v7.2 box, I am going to upgrade the v4.8 box.

BTW, you can include [font="Courier New"]phpinfo()[/font] anywhere for test purposes . . .it will insert itself after and before anything that follows. The [font="Courier New"]testdb.php[/font] thing is just a proof-of-concept thing that I cobbled up :)

Thanks,
RW
 
Back
Top