1. Ubuntu PHP4 Question

    Date: 02/17/05 (Apache)    Keywords: php, apache

    I have successfully installed APache2 with Synaptic on Ubuntu, but the PHP module is not specified in the apache.conf file even though I used Synaptic to install PHP4. Is there a differnt method to activate the module within apache.conf?

    Source: http://www.livejournal.com/community/apache/17050.html

  2. Redirect _all_ queries to a single file

    Date: 02/06/05 (Apache)    Keywords: web, apache

    So I got tired of seeing advertisements on every web page I visit, really really tired. I downloaded a hosts file (http://someonewhocares.org/hosts/) that declares a huge list of servers known to display ads as, which redirects it to the copy of apache I run continuously. This of course speeds up page loads quite a bit, but it would display "page not found" errors everywhere an ad used to be. Sometimes it would just have a picture frame, but the picture would be empty. In any case, I was happy that the ads were gone.
    Then I got to thinking (uh oh!), how could I make this better? I wanted to remove the page not found text and replace it with a blank nothing, like a transparent gif or something. As it turns out, usually the requests the ad servers are to subdirectories or whatnot, usually long strings of meaningless characters. There's no possible way to put a transparent gif at every possible location, but I can use mod_rewrite instead.
    I tried playing around a bit, and came up with the idea of redirecting all requests to a small 1x1 gif that was a single transparent pixel. Problem is, I can't seem to get it to do what I want. Here is the simple rule I came up with in .htaccess

    options +FollowSymLinks

    RewriteEngine On
    RewriteBase /
    RewriteRule (.*) /trans.gif

    I have .htaccess and trans.gif stored in the root of my webserver's directory, which is /Library/WebServer/Documents. I adjusted the entry for that directory to be "AllowOverride All" just in case. Now the server is returning "Internal Server Error" instead of page not found. What am I doing wrong?

    Thanks in advance!

    Source: http://www.livejournal.com/community/apache/16787.html

  3. Cleaning Up the Server Header

    Date: 01/20/05 (Apache)    Keywords: php, linux, apache

    Currently, my httpd server headers looks like:
    Apache/1.3.33 (Unix) (Gentoo/Linux) mod_perl/1.27 PHP/4.3.10

    How might I clean up the header a bit (so as to not let people know of all the modules I"m running)? Preferably, I'd like it to ONLY say Apache.

    Probably a noob question, heh, sorry.

    Source: http://www.livejournal.com/community/apache/16193.html

  4. How do I enable mod_proxy on Apache2 in linux

    Date: 01/07/05 (Apache)    Keywords: linux, apache

    i think i'm the only person that ever posts here. ;)

    again, i'm new to apache under linux, so this may be elementary...

    how exactly do I enable mod_proxy in Apache2? I'm pretty certain I compiled it properly, but I get Invalid command 'RewriteEngine' in the error log from my [previously working on win32 apache] .htaccess file. I am presuming this is because mod_rewrite is not enabled.

    I thought [though retrospectively incorrectly] that if I compiled Apache with --enable-MODULE it would automatically enable those modules. Is there something else I need to do?

    Here's my ./configure script -- does it look right?
    ./configure -prefix=/usr/local/apache2 \
    --enable-module=so \
    --enable-module=auth_db \
    --enable-module=digest \
    --enable-module=example \
    --enable-module=log_agent \
    --enable-module=mime_magic \
    --enable-module=usertrack \
    --enable-module=auth_anon \
    --enable-module=auth_digest \
    --enable-module=cern_meta \
    --enable-module=expires \
    --enable-module=proxy \
    --enable-module=unique_id \
    --enable-module=vhost_alias \
    --enable-module=auth_dbm \
    --enable-module=headers \
    --enable-module=info \
    --enable-module=log_referer \
    --enable-module=mmap_static \
    --enable-module=speling \

    Thanks so much!

    Source: http://www.livejournal.com/community/apache/15652.html

  5. problem reinstalling apache on linux

    Date: 01/06/05 (Apache)    Keywords: linux, apache

    i'm trying to reinstall apache2 on fedora 3 because i failed to compile it with mod_rewrite. i configure it with:
    ./configure -prefix=/usr/local/apache2 \
    --enable-cgi \
    --enable-info \
    --enable-rewrite \
    --enable-speling \
    --enable-usertrack \
    --enable-deflate \
    --enable-ssl \
    --enable-so \
    --enable-mime-magic \

    now you may be wondering why that last line is there. primarily because i don't know what i'm doing. ;) i don't know what mods-shared=most includes, and i want to make sure it includes those that were explicitly stated.

    when i do a make, it terminates after a minute with Error 1

    os/unix/.libs/libos.a(unixd.o)(.text+0x202): In function `unixd_pre_config':
    /usr/src/httpd-2.0.52/os/unix/unixd.c:206: undefined reference to `ap_uname2id'
    os/unix/.libs/libos.a(unixd.o)(.text+0x213):/usr/src/httpd-2.0.52/os/unix/unixd.c:207: undefined reference to `ap_gname2id'
    os/unix/.libs/libos.a(unixd.o)(.text+0x2ce): In function `unixd_set_rlimit':
    /usr/src/httpd-2.0.52/os/unix/unixd.c:255: undefined reference to `ap_log_error'
    os/unix/.libs/libos.a(unixd.o)(.text+0x2ea):/usr/src/httpd-2.0.52/os/unix/unixd.c:246: undefined reference to `ap_getword_conf'
    os/unix/.libs/libos.a(unixd.o)(.text+0x350):/usr/src/httpd-2.0.52/os/unix/unixd.c:268: undefined reference to `ap_log_error'
    os/unix/.libs/libos.a(unixd.o)(.text+0x38e):/usr/src/httpd-2.0.52/os/unix/unixd.c:260: undefined reference to `ap_getword_conf'
    os/unix/.libs/libos.a(unixd.o)(.text+0x7ed): In function `unixd_accept':
    /usr/src/httpd-2.0.52/os/unix/unixd.c:585: undefined reference to `ap_log_error'
    collect2: ld returned 1 exit status
    make[1]: *** [httpd] Error 1
    make[1]: Leaving directory `/usr/src/httpd-2.0.52'
    make: *** [all-recursive] Error 1

    now, i did not 'uninstall' the previous version of apache because it didn't have a make uninstall and i thought it would just overwrite the necessary files when i did a make install. any help is appreciated!


    Source: http://www.livejournal.com/community/apache/15490.html

  6. How do I proxy requests to a server behind a firewall

    Date: 12/18/04 (Apache)    Keywords: hosting, apache

    Hi everybody!

    I've got two apache servers, each hosting off of :80. Both are behind a NAT router and I only have one IP address. :80 is forwarded to one server [www.vaxlan.net], and I'm trying to find a way to configure it such that it will pass requests to the other server [fade.vaxlan.net], which only has a private IP address.

    I was thinking that mod_proxy might be the way to go, but I can't seem to find any clear solution. Any thoughts would be appreciated!

    Source: http://www.livejournal.com/community/apache/15081.html

  7. SSL migration woes...

    Date: 11/30/04 (Apache)    Keywords: apache

    I'm trying to move our SSL certificate to a new server. So I copy the crt and key files over, and changed DNS to make the name they are registered to point to the new server. But first I left the default ssl config in place to test. The default config correctly complainned that the hostname does not match the localhost.localdomain in the certificate. So I changed the config to point to the new certificates and restarted apache. Apache started without error, and there were no errors in the logs. But port 443 was only doing http, not https.

    The only mention of 443 is in ssl.conf which is being loaded by httpd.conf.

    This is with apache 2.0.48 with mod_ssl and OpenSSL, running on a RedHat 9 system.

    Source: http://www.livejournal.com/community/apache/14182.html

  8. "Missing" shared object file, but it's there

    Date: 11/02/04 (Apache)    Keywords: apache

    Hi experts. :)

    What reason might there be for this error message:

    Syntax error on line 26 of /usr/local/apache/conf/httpd.conf:
    Cannot load /usr/local/apache/libexec/mod_rewrite.so into server: /usr/local/apache/libexec/mod_rewrite.so: cannot open shared object file: No such file or directory
    I can't really spot a syntax error — the line in question is:
    LoadModule rewrite_module libexec/mod_rewrite.so
    and the file /usr/local/apache/libexec/mod_rewrite.so actually does exist. Help? (All I'm trying to do is to enable mod_rewrite.)

    Source: http://www.livejournal.com/community/apache/13305.html

  9. mod_rewrite?

    Date: 09/21/04 (Apache)    Keywords: php, apache

    Hi all, hope someone can give me insight here. I've got an install of phpbb on my site, and I want to use a custom, outside signup page for new users. By default phpbb directs users to /installdir/profile.php?mode=register&agreed=true when they click on the appropriate link. Would mod_rewrite be the answer to redirecting someone who hits that link? A traditional alias or redirect does not seem to work, as apache throws an error about the config, and it's not based on the page itself, but the url parameters being passed. I know I could just as easily hack up the php code for the forum, but I'd prefer this non-invasive method, plus it would catch anyone trying to circumvent a simple redirect within the code. Any hints?

    Oh, here's my current rewrite ruleset:
    RewriteCond %{QUERY_STRING} ^(mode=register&agreed=true.*) [NC]
    RewriteRule ^/forum/profile\.php$1 /account.php [L]

    Source: http://www.livejournal.com/community/apache/11984.html

  10. Quick question...

    Date: 07/31/04 (Apache)    Keywords: html, apache

    Hiya everyone,

    Ok, this is a quick, perhaps idiotic, question that I *think* has to do with Apache..

    I'm running OS X.3 built in Apacher server to run my personal site www.jubei-ruri.com. When I go to www.jubei-ruri.com/galleries/ it directs perfect however if I go to www.jubei-ruri.com/galleries it borks out and attempts to load off of the localhost, mechaserver.local.

    I'm 100% new to Apache and 90% new to HTML so I had some friends look over the HTML and they said everything looks kosher to them. The offered up that it might just be something with the way Apahce handles that type of thing and to ask a person versed in Apache. Thus I'm here. ^_^

    Any suggestions or ideas?

    Thank you very much!

    Source: http://www.livejournal.com/community/apache/10723.html

  11. URL Handling...

    Date: 12/31/04 (PHP Development)    Keywords: php, apache

    I hate mod_rewrite. There, I said it.

    I've noticed that LiveJournal uses its own form of URL handling in Perl, by the use of the PerlRequire directive. What I presume that it does, is pass the URL to the specified script, allows processing for special cases (i.e. /users/, /community/, etc) but then passes the URL back to Apache for all unhandled URLs.

    Does PHP allow this kind of processing?
    Can I combine Perl and PHP in this manner?

    Source: http://www.livejournal.com/community/php_dev/50880.html

  12. Mambo on FreeBSD 5.3

    Date: 02/23/05 (PHP Community)    Keywords: php, mysql, xml, sql, java, linux, apache

    I'm having a few problems getting Mambo working on FreeBSD 5.3

    Whenever I try to log in to the administrators account, with a valid username\password, you get presented with the same screen with the username\password boxes still filled in. /var/log/messages states "Feb 23 17:42:42 linux kernel: pid 15803 (httpd), uid 1006: exited on signal 11"

    Nothing is written to the Apache access or error logs

    If I try to log in with an invalid combo, a JavaScript popup tells me I got either the username or password wrong. So, the authentication is sort-of happening

    The only useful thread I've found on the Mambo forums was this one. Which states "To all who have this issue, it is a problem with duplicate extension entries in your php.ini"

    All I have in my php.ini that contains references to extension are:

    extension_dir = "/usr/local/lib/php/20020429/"

    So there aren't any duplicates

    I really don't know much about setting PHP up. Does anyone have any pointers?

    I seem to remember having this problem in the past with Gallery, and the issue was resolved by installing php4-extensions

    Here's the version of all PHP stuff I have installed:

    # portversion -v | grep php
    mod_php4-4.3.10_2,1         =  up-to-date with port
    php4-bz2-4.3.10_2           =  up-to-date with port
    php4-ctype-4.3.10_2         =  up-to-date with port
    php4-extensions-1.0         =  up-to-date with port
    php4-gd-4.3.10_2            =  up-to-date with port
    php4-mysql-4.3.10_2         =  up-to-date with port
    php4-openssl-4.3.10_2       =  up-to-date with port
    php4-overload-4.3.10_2      =  up-to-date with port
    php4-pcre-4.3.10_2          =  up-to-date with port
    php4-posix-4.3.10_2         =  up-to-date with port
    php4-session-4.3.10_2       =  up-to-date with port
    php4-snmp-4.3.10_2          =  up-to-date with port
    php4-tokenizer-4.3.10_2     =  up-to-date with port
    php4-xml-4.3.10_2           =  up-to-date with port
    php4-zlib-4.3.10_2          =  up-to-date with port
    phpMyAdmin-2.6.1            =  up-to-date with port

    Any pointers would be most appreciated!

    Update: Sorted. It seems that I did have 2 entries for session.so. One was in /usr/local/etc/php.ini and the other was in /usr/local/etc/php/extension.ini

    I commented one out, and it started working

    Leaving this entry in-tact, just in case anyone else has the same problem

    Source: http://www.livejournal.com/community/php/265349.html

  13. chown and chmod

    Date: 03/09/05 (PHP Community)    Keywords: php, apache

    I'm using a script to upload files to my system. That means the files are created by Apache, and I can't access them with my FTP/SSH login. I need to back up the files uploaded, and mirror them.

    So, what I'm looking for is a simple (php) script to recursively chown, chgrp and chmod the files and folders on a given path.

    Yes, it's easy, and yes I could write it myself. But, I don't have time to do it tonight, and it's the kind of thing loads of people have hanging around, so if anyone has code they can 'lend' me to do the job that I can just run in the morning, that'd be great.


    Source: http://www.livejournal.com/community/php/271272.html

  14. Apache2 in chroot jail, sigfaulting child process

    Date: 03/11/05 (Apache)    Keywords: php, linux, apache

    I upgraded apache from 2.0.52 to 2.0.53 in my chroot jail, on linux.

    it took forever to start, and then segfaulted the child processes whenever I hit the server.

    I eventually tracked the startup delay to an insufficient quantity of entropy for /dev/random. I gave it a lot more entropy and it still blocked occasionaly, so I moved to /dev/urandom.

    I moved ldd and strace into the jail to double check things. I do not appear to be missing any libraries.
    I ran strace. I ran it with a bunch of different flags, I end up with child process straces that look just fine, a couple errors that are expected due to the jail, then, BAM, SIGSEGV, with no warning or explaination.

    It doesn't segfault if I remove -D PHP5 and -D SSL... but again, I don't seem to be missing any libraries.

    child process stack trace:

    getpid() = 16013
    rt_sigaction(SIGHUP, {0xb7ca7dc0, [], SA_INTERRUPT}, {0xb7ca7dc0, [HUP USR1], 0}, 8) = 0
    rt_sigaction(SIGTERM, {0xb7ca7dc0, [], SA_INTERRUPT}, {0xb7ca7dc0, [], 0}, 8) = 0
    rt_sigaction(SIGUSR1, {SIG_IGN}, {0xb7ca7dc0, [HUP USR1], 0}, 8) = 0
    getpid() = 16013
    getpid() = 16013
    geteuid32() = 0
    setgid32(81) = 0
    open("/proc/sys/kernel/ngroups_max", O_RDONLY) = -1 ENOENT (No such file or directory)
    open("/etc/group", O_RDONLY) = 13
    fcntl64(13, F_GETFD) = 0
    fcntl64(13, F_SETFD, FD_CLOEXEC) = 0
    fstat64(13, {st_mode=S_IFREG|0644, st_size=13, ...}) = 0
    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fea000
    _llseek(13, 0, [0], SEEK_CUR) = 0
    read(13, "apache:x:81:\n", 4096) = 13
    read(13, "", 4096) = 0
    close(13) = 0
    munmap(0xb7fea000, 4096) = 0
    setgroups32(1, [81]) = 0
    geteuid32() = 0
    setuid32(81) = 0
    getpid() = 16013
    gettimeofday({1110440023, 141397}, NULL) = 0
    getpid() = 16013
    brk(0x82f8000) = 0x82f8000
    getpid() = 16013
    time(NULL) = 1110440023
    gettimeofday({1110440023, 142945}, NULL) = 0
    gettimeofday({1110440023, 143359}, NULL) = 0
    semop(3014687, 0xb7d866ec, 1) = 0
    poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN, revents=POLLIN}], 2, -1) = 1
    accept(3, {sa_family=AF_INET, sin_port=htons(1467), sin_addr=inet_addr("xx.xx.xx.xx")}, [16]) = 13
    semop(3014687, 0xb7d866f2, 1) = 0
    gettimeofday({1110440031, 271384}, NULL) = 0
    getsockname(13, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, [16]) = 0
    time(NULL) = 1110440031
    gettimeofday({1110440031, 272605}, NULL) = 0
    fcntl64(13, F_GETFL) = 0x2 (flags O_RDWR)
    fcntl64(13, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    time(NULL) = 1110440031
    read(13, 0x82f49d8, 8000) = -1 EAGAIN (Resource temporarily unavailable)
    poll([{fd=13, events=POLLIN, revents=POLLIN}], 1, 300000) = 1
    read(13, "\200g\1\3\0\0N\0\0\0\20\1\0\200\3\0\200\7\0\300\6\0@\2"..., 8000) = 105
    --- SIGSEGV (Segmentation fault) @ 0 (0) ---
    chdir("/usr/lib/apache2") = 0
    rt_sigaction(SIGSEGV, {SIG_DFL}, {SIG_DFL}, 8) = 0
    getpid() = 16013
    getpid() = 16013
    kill(16013, SIGSEGV) = 0
    sigreturn() = ? (mask now [RTMIN])
    --- SIGSEGV (Segmentation fault) @ 0 (0) ---

    Maybe I'm missing something?

    Source: http://www.livejournal.com/community/apache/17724.html

  15. Problem with bazaar style of development

    Date: 12/20/04 (Java Web)    Keywords: apache

    Ellison Brookes developer in James Goslings thoughts agrees with James Gosling that Sun's strangle hold of the APIs leads to greater stablilty. This is true. Too many cooks spoil the broth. The problems with multitude of open source projects in the bazaar model (thanks to Apache, SourceForge etc.) is that it is messy like a fish market. [...]

    Source: http://blog.taragana.com/index.php/archive/problem-with-bazaar-style-of-development/

  16. index file help

    Date: 04/01/05 (Apache)    Keywords: html, java, apache

    hey, I'm working on making a simple http and ftp server to share files and stuff from my cable connection here at the house. Its running apache on win xp, now if there is a folder with out an index file it generates one automatically. Now how do I customize this to change the background and how stuff looks and add links or what not? Do I have to do a server side script? or is there a way i can use java scripts or some sort of code in a html file? I'm kind of new, please help.

    Source: http://www.livejournal.com/community/apache/18392.html

  17. Open source bundling

    Date: 03/31/05 (Open Source)    Keywords: php, mysql, database, sql, web, apache

    Open source bundling is the new trend. Martin Lamonica's story yesterday about SourceLabs describes one such bundles. Most are aimed at businesses. Many, like the SourceLabs bundle, are AMP Stacks, with the Apache Web Server, MySQL database, and PHP scripting tools. The idea is for a company to give ...

    Source: http://blogs.zdnet.com/open-source/index.php?p=215&part=rss&tag=feed&subj=zdblog

  18. PHP, mod_rewrite and header() - This is a good one.

    Date: 04/08/05 (PHP Community)    Keywords: php, browser, css, html, web, apache

    I'm trying to use mod_rewrite to intercept all requests made to my web server and route them to a php file (index.php) which then parses the request and does what it can to serve the appropriate page. I'm doing this in an effort to use meaningful URLS as opposed to query strings.

    I have everything about half-working but I can't send headers from index.php, which is important because not only do I need to be able to generate 404 errors, but the files that will be included by index.php need to set their own headers (content-type, content-language).

    These are the lines I'm using in .htaccess for mod_rewrite:

    RewriteEngine on
    RewriteRule index.php$ - [L]
    RewriteRule !\.(jpg|gif|css)$ /index.php [L]

    And this is the code I'm using in index.php that's causing a problem:
    if ($url_array[0] == 'poems') { // POEMS SUBDIRECTORY
    	require('lists.php'); // GET LISTS
    	$get = 'poems';
    	if (array_search($url_array[1], $poem_list)) {
    		$which = $url_array[1];
    	else {
    		if (!headers_sent()) {
    			header('HTTP/1.1 404 Not Found');
    else {
    	if (!headers_sent()) {
    		header('HTTP/1.1 404 Not Found');

    As you can see, I'm checking to see if headers have been sent before trying to set them, but they don't seem to have been. Whenever I try to set a status header with the syntax HTTP/1.1 XXX (description) an internal server error occurs. I have been able to set status using the header Status: 404, but rather than the standard 404 error page appearing a blank HTML document is served to the browser.

    Apache version is 1.3.19 running on Windows 98. PHP version is 4.2.3 running as a cgi.

    Any help would be much appreciated, I'm pretty far out of my depth with changing the way Apache works.

    Source: http://www.livejournal.com/community/php/281753.html

  19. Hosting Options

    Date: 04/16/05 (PHP Community)    Keywords: php, mysql, sql, web, linux, hosting, apache

    I am currently hosting my web site with powweb, the problem is that I am outgrowing its feature set. I’m working on some applications that need the MySQL InnoDB table type, or at least would find it very useful. Does anyone know of a hosting provider that supports the following:

    PHP 5.0x
    MySQL 4.1.x With InnoDB
    Apache (1.3 or 2.0 would be fine)

    Ideally running linux or BSD

    Source: http://www.livejournal.com/community/php/286793.html

  20. this is going to sound so dumb...

    Date: 04/19/05 (Apache)    Keywords: apache

    ok i want to stop a site from being cached - well i want to set the index to expire say once a week -

    now i'm not a coder just a simple stoopid designer so as you can imagine the Apache documentation gave me a headache.

    - I have cPanel.

    do i do something with the apache handlers in cPanel


    do i need to create a .htaccess file and enter the code myself? and if so do i really simply type the code into the file and upload it??

    Source: http://www.livejournal.com/community/apache/18748.html

  ||  Next page

antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home