Getting PHP to work with Apache

Hi all,

Is there a way to get php55 to work with apache24? When I installed php24 I forgot to select apache as the httpd. Is there a way to fix this without starting all over again? Thanks.
 
well ether waydo you know how to fix this?
Yes I do. My consulting fees are $200 per hour. If I have to fly to your town the minimal charge is 8 hours. I fly business class only and don't stay in $50 motels. Expenses are covered by you of course. Please send me PP if you are interested.
 
More seriously, if you want custom configurations, it's time to stop using packages and start using ports. Yes, this can be done without starting all over. Deinstall the incorrect packages, configure the ports wanted, and install them. I don't use PHP, but it should not be much more difficult than installing Apache 2.4 first, then installing the PHPs port with the web module options selected.
 
I believe that nowadays, you no longer to need to include the Apache option when configuring PHP, you just have to install the www/mod_php5 port. See /usr/ports/UPDATING entry from 20140327.

You might be able to just do pkg install -y mod_php5. All this is untested by me. Oko said to use mod_php55 and as I read your original post, it seems that that is the version of php that you want. I'm pretty sure that mod_php5 is still for php-5.4. I repeat, all untested by me.

So...and this isn't a lecture, just an attempt to spare you more sarcastic answers. Your more specific question after hearing what you needed to do was, How do I do this, rather than, Do you know how to fix this. It's difficult to know what to ask and, sometimes as important, how to ask, when you're beginning, and sometimes, it can be really frustrating when someone says, Do X, and you don't know how to do X. However, you'll find if you say, Thanks, would you give me a little guidance in how I do X, that most people will be glad to share their knowledge.

Actually, now that I think about it, with this change (in no longer having to specifically configure your PHP version of choice to work with Apache), you may be able to do this entirely from packages. (Once again, untested by me)
 
is the link I used to configure and they all are ports and not packages and I made a mistake when installing PHP I forgot to include the Apache option.
 
Besides I am doing this to learn how to use UNIX. It is important to me to learn how to use UNIX and this is a part of my journey.
 
You want me to watch a 15 minute to see how you installed it?
I don't know how old it is, and I'm sorry, I'm not going to watch the video. You've been given an answer and have not, judging from your posts, tried it. Judging from your answers to suggestions thus far, I'm also going to suggest that you take a look at
http://www.catb.org/esr/faqs/smart-questions.html

Yeah, we know you made a mistake. What we are saying is that it might no longer matter. Rather than asking people to take 15 minutes of their time to watch a video, you will have better luck if you say, this video, posted in February, BEFORE the date I mentioned in UPDATING, says to do X, Y, and Z.

I don't want to be rude, but so far, you're ignoring the efforts people are making to help you.

TL;DR (That means Too Long, Didn't Read). You're apparently inexperienced, which is fine. Take a look at the link I gave you about asking questions on forums and such. Meanwhile, you are using an instructional video that should no longer apply, so despite your error, you should be able to fix it simply. You were told what to install, you asked how, you were told that. Once installed, restart Apache and see if PHP works. Once you've done that, if it doesn't work, then, after reading the link I gave you about asking questions, post again.
 
A good source of information when it comes to the several options for managing ports is the ports(7) manual page. Although I do agree with scottro up there I also think that some of the other posters could be a little more lenient too.

Not everyone has English as their native language and sometimes people don't pick things up in the way you intended them. That's something to keep into consideration as well on support forums, in my opinion of course.

So having that out of the way...

defiant1970 When you have installed a port and want to change its configuration you can do so using the # make config command, also see that manual page I mentioned earlier. So the good news is that you can indeed change stuff. The bad news though is that you will have to re-install the port for the changes to get into effect.

I'd definitely advise you to look into ports-mgmt/portmaster, this can make your life a whole lot easier. It sure beats using the make command every time, and it can help you sort the ports out (dependencies and such).

I did skip through that video (was curious) and as I suspected: the video is outdated. As some of the others also mentioned; the Apache option is no longer available in lang/php55, so for PHP support to work within Apache you also need to install www/mod_php55. So use either of these commands: # make -C /usr/ports/www/mod_php55 install clean or install and use the portmaster command I mentioned earlier: # portmaster www/mod_php55.

Hope this gives you some ideas.
 
Back
Top