Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
Old 06-04-2005, 12:31 PM   #1 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
Linux/Apache/PHP Problems

Having a few issues with my server box, running Debian Testing. It used to have Apache 2 on it. A couple of days ago, I decided to move that to Apache 1, just because Im more comfortable with it. I go to apt-get uninstall it, and it wont. Says it isnt installed--but I know for a fact it is, Ive been using it to serve a few webpages for a while. After tinkering with that to no avail, I just decide to go ahead and install Apache 1 and go from there. I do it, and immediately am getting problems--very slow, PHP errors all over, the works. So I uninstall PHP and reinstall, and since then, have been unable to get PHP working again. Everytime, it tries to download the PHP page, rather than serve it up like normal. Ive tried uninstalling and reinstalling several times, poked through httpd.conf several times and didnt see anything wrong, and everything that I could think of, to no avail. Ive never had problems like this before--always just apt-get installed apache then php, and it worked.

Any suggestions?
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 06-04-2005, 11:23 PM   #2 (permalink)
In Your Dreams
 
Latch's Avatar
 
Location: City of Lights
Multiple ideas here, probably no useful ones

#1) Did you use apache or httpd as the name when apt-get uninstalling or whatever? I think apache 2 is (officially) referred to as httpd, as the apache group has many projects.

#2) I'm not too familiar with debian packages, but I'm guessing there's the ability to list all the packages installed on the system (with rpms, it's rpm -qa). Can you just <whatever> | grep http or <whatever> | grep apache, to see what it says? Then apt-get uninstall <results from grep>.

#3) I believe httpd/apache has to be started with the -DPHP4 (or -DPHP5) option to handle PHP stuff. Well, on the Gentoo box that I had I had to do that. The Fedora box I'm on now doesn't seem to have that option set and it handles php fine, so.. I dunno (although I think the gentoo was apache1 and this fedora box is apache2).

Like I said, a few ideas.. probably none useful .
Latch is offline  
Old 06-05-2005, 12:27 AM   #3 (permalink)
Junkie
 
If it's downloading the PHP code instead of running the script, it sounds like Apache doesn't have a MIME type handler for PHP. Since you installed PHP separately this time, you may have installed it as an executable instead of an Apache module. In that case, Apache must be told to pass PHP files to the executable. Check your apache.conf file to see if it is handling PHP files correctly.

Last edited by SinisterMotives; 06-05-2005 at 12:29 AM..
SinisterMotives is offline  
Old 06-05-2005, 05:24 AM   #4 (permalink)
Professional Loafer
 
bendsley's Avatar
 
Location: texas
SinisterMotives, when you use apt in Debian to install PHP3/4 with apache, it just works. It compiles everything for you each time you install something (ie. php4-gd, php4-mysql) to work with the current working version of Apache.

Latch, in Debian, you don't have to do anything special to get php loading with apache. It sets this up automatically and you can remove the functionality afterwards if needed.

In Debian, the Apt names are apache and apache2, not httpd.


Sailor, see if you have a program on there called "aptitude". It's much better than apt-get as far as managability and functionality. If you're using sarge (testing, very soon to be stable as 3.1), it should be on there automatically.

Try doing "aptitude update", let is pull the update info from apt-get and then try doing "aptitude search apache2". The package name as far as I know is just "apache2", not something like "apache2-server". Do an "aptitude remove apache2". What does it say?

I would uninstall php4 ("aptitude remove php4, plus any extensions you have installed) and apache2, then reinstall apache and php4.

If it's still not working, do "aptitude" by itself and go into the visual part of it. It will show you everything that is installed notated by an "i" next to the package. I'm not sure where apache2 is in the list, but should be quite easy to find. You use + to install and - to remove packages. The info on how to use it is at the top of the aptitude program.

If all else fails, I would be happy to SSH into your box if needed and help you out.
__________________
"You hear the one about the fella who died, went to the pearly gates? St. Peter let him in. Sees a guy in a suit making a closing argument. Says, "Who's that?" St. Peter says, "Oh, that's God. Thinks he's Denny Crane."
bendsley is offline  
Old 06-05-2005, 09:59 AM   #5 (permalink)
Insane
 
Location: Austin, TX
Its problems like this that have made me totally hate most packaging systems. In a pinch, I like slackware packages because they're just simple .tar.gz packages of the binaries I want.

But in general I prefer just downloading the sources and building them myself.
skaven is offline  
Old 06-05-2005, 12:53 PM   #6 (permalink)
Professional Loafer
 
bendsley's Avatar
 
Location: texas
skaven: tar.gz packages aren't just slackware packages (though you probably know this). And too, if you use some of the packaging systems, they auto-resolve dependencies for you.

Debian's apt repository and gentoo's emerge system are far superior than anything else out there.
__________________
"You hear the one about the fella who died, went to the pearly gates? St. Peter let him in. Sees a guy in a suit making a closing argument. Says, "Who's that?" St. Peter says, "Oh, that's God. Thinks he's Denny Crane."
bendsley is offline  
Old 06-06-2005, 11:05 AM   #7 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
Woo! OK, turns out I hadnt removed one PHP package (php-gd), and once I found and removed that and reinstalled it all, it worked. Now if I could just figure out what's keeping wordpress from working...
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 06-06-2005, 12:35 PM   #8 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
Or... Not. This is weird. Certain things are connecting and working fine (phpmyadmin), but other things wont connect to the database--wordpress and several other things I have written. Coming back saying mysql_connect() is an undefined function, implying something is up with php4-mysql--but phpmyadmin works. Im totally confused... any suggestions?
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 06-06-2005, 12:55 PM   #9 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
And its working, again. For some reason, despite aptitude telling me that php4-mysql was installed, it seems like it wasnt. I apt-get installed it, and everything started working just fine. Very, very strange.
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 06-06-2005, 01:13 PM   #10 (permalink)
Professional Loafer
 
bendsley's Avatar
 
Location: texas
what happens if you go into phpmyadmin and click on the php info link.......does it show the version of php and what you have compiled into it?
__________________
"You hear the one about the fella who died, went to the pearly gates? St. Peter let him in. Sees a guy in a suit making a closing argument. Says, "Who's that?" St. Peter says, "Oh, that's God. Thinks he's Denny Crane."
bendsley is offline  
Old 06-06-2005, 01:43 PM   #11 (permalink)
beauty in the breakdown
 
Location: Chapel Hill, NC
Yep. phpinfo() and phpMyAdmin were working fine, but nothing else (as far as I could see) that used php/mysql functions was working. Very strange.
__________________
"Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws."
--Plato
sailor is offline  
Old 06-08-2005, 08:47 AM   #12 (permalink)
Crazy
 
Location: Salt Town, UT
In the future, if you are having problems with a debian package there are three standard steps you should take (each more drastic than the last). In these examples, replace <package> with the package name.

1. dpkg-reconfigure <package>
This will reconfigure the package, and ask you the configuration questions about the package again. With the PHP modules, it will check the php.ini files, and make sure that it is properly installed in each one of them.

2. apt-get --reinstall install <package>
This will reinstall the package, downloading it if necessary, and unpacking and installing just as if you were upgrading to that version.

3. dpkg --purge <package> ; apt-get install <package>
CAUTION: This will remove all configuration files for this package. Any custom modifications to the configuration files will be destroyed. This will totally remove, and then reinstall the package. Only use this as a last-case resort, because you will also have to remove all packages that depend on the package you are reinstalling.
Rawb is offline  
 

Tags
linux or apache or php, problems


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 06:53 AM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360