|
-
Hi!
Date: 04/02/06
(Apache) Keywords: php, mysql, sql, apache
I'm new to this community and to Apache. I'm basically trying to install Apache in conjunction with PHP and MySQL, using an online manual about the topic. When it comes to the part about Apache, it only tells me to install Apache according to the instructions on the site, but I couldn't find any installation instructions on the site or in the files I downloaded from the Apache's main site. I found a file titled INSTALL, but it doesn't have an extension and my OS (Windows XP) does not recognize it. I'd appreciate all your suggestions, comments and help as to what I need to do.
Source: http://community.livejournal.com/apache/31570.html
-
xpath not working, subscription to mailing lists weirdness
Date: 04/09/06
(PHP Community) Keywords: php, html, xml, web, linux, spam, apache
Hi there.
I'm trying to load an XHTML file as a DOMDocument, and get its text using xpath to find the node. Something's going wrong somewhere, but I can't figure out what.
I've used xpath a number of times before, from xslt (Xalan and MSXML2) and C++ (libxml2, Xerces and MSXML2), so I thought I had a good idea of what I was doing. The test case I've got this down to (from reading the PHP docs for DOMXPath->evaluate() and DOMXPath->query() is pretty short.
The first file is pretty simple - it's just the data file for the second one to load.
page1.php
Title
Body
The second is the one that does the work.
page2.php
Home page.
query($path, $context);
$obj = new ReflectionObject($list);
print("Search from \"" . $context->nodeName
. "\" for \"" . $path
. "\" (" . $obj->getName() . ") \n");
print("\n");
for ($i = 0; $i < $list->length; ++$i)
{
print("- " . $list->item($i)->nodeName . "
\n");
}
print(" \n");
}
$dom = new DOMDocument();
$dom->load("page1.php");
print("Document Element node name: "
. $dom->documentElement->nodeName . " \n");
pathsearch($dom, $dom, "/html/head/title");
pathsearch($dom, $dom, "/");
pathsearch($dom, $dom->documentElement, "/");
pathsearch($dom, $dom, "/*");
pathsearch($dom, $dom, "/html");
pathsearch($dom, $dom, "//html");
pathsearch($dom, $dom->documentElement, ".");
pathsearch($dom, $dom->documentElement, "./*");
pathsearch($dom, $dom->documentElement, "./head");
pathsearch($dom, $dom->documentElement, ".//head");
pathsearch($dom, $dom->documentElement, ".//head/*");
pathsearch($dom, $dom->documentElement, ".//head/title");
pathsearch($dom, $dom->documentElement, ".//head//title");
?>
I get an empty nodelist for the first pathsearch(), which is the one I'm looking for.
The second and third calls to pathsearch() check that I can actually access the root node, and get a non-empty list, as expected.
Call 4 ("/*") finds "html", but 5 and 6 ("/html" and "//html") find nothing. An empty result for "//html" is very odd, considering "/*" finds an "html" node.
Calls 7-13 try finding other nodes starting from the documentElement() (/html) just in case it doesn't like calling without a context. Of these, only 7 and 8 ("." and "./*") succeed with non-empty results. However the results I get are exactly what I'd expect ("html" and {"head", "body"} respectively) which leaves me even more confused as to why all the others are failing.
Any help here would be appreciated. Even just reproducing my results would be good, so I know it's not just my setup that's b0rked.
(I'm running php 5.1.2 with libxml 2.6.23 on apache 2.0.55 on linux 2.6.15. More system info can be provided if necessary)
I originally tried to subscribe to the php-general mailing list to ask this question there, but haven't been able to, and have had no reply from php-list-admin@lists.php.net or postmaster@lists.php.net.
I've sent a couple of requests, both from the website and via email, to subscribe to php-general@lists.php.net. Each time I've got the "confirm subscribe to php-general@lists.php.net" reply and replied to it. Each time, I've replied using both of the methods they suggest, but have received nothing since. No "welcome to the list" message, no list messages, no bounces, nothing. I've checked by spam folder, and it's not getting filed there.
So, I tried emailing php-list-admin@lists.php.net which is supposedly staffed by people. I did that on March 31 and again on April 4. Nothing. No replies, no bounces, nothing.
So, on April 7 I tried emailing postmaster@lists.php.net. Again nothing.
Does anyone know WTF is going on over there? Why the hell don't they answer their goddamn email? I've been polite, and I've asked just for some kind of reply to let me know that someone is at least reading my messages. Even a "We're not going to help you" would be more useful that goddamn silence.
So, does anyone else know if they are just a bunch of useless fucktards, or what?
Source: http://community.livejournal.com/php/436121.html
-
PHP works in a .PHP file but not when it's in a .HTM file
Date: 04/10/06
(PHP Community) Keywords: php, html, apache
This is driving me nuts! I know it's going to be something really simple, but I just can't work it out.
Backstory: I've got a fresh install of Fedora FC5 on my server (the previous hard drive went pffzt) and I'm trying to get my WordPress blog running again.
The problem is I can't seem to get PHP working properly. I've created a tiny HTM test file which doesn't show the PHP content, and yet it's working fine as a pure PHP file.
I'm adamant the problem must be in the HTTP config but I just can't see what's wrong. How do I tell Apache to process PHP within an HTML file?
(httpd.conf has virtually all the default settings - I've only added my site info but I've not changed/added/removed any LoadModule lines or anything else like that.)
Source: http://community.livejournal.com/php/436344.html
-
Error Document handling issues
Date: 04/14/06
(Web Development) Keywords: php, browser, apache
Hello everyone
I've set the ErrorDocument in apache's .htaccess file to point to a particular php script. The latter outputs an image. That way I'm trying to output an image which actually does not exist under the url.
Basically this works fine with browsers, however when I try to give the image to a script (which I do not have access to) I get an error.
My two areas of concern are the following, is it possible for the user agent to however know that he is getting a response generated by an error handler, rather than the real thing?
If not it might be that I'm providing bad headers, since browsers are much more tolerant than the RFCs. Basically all I'm sending out is a "content-type", nothing more. Might this be too little?
Best, Narek
Source: http://community.livejournal.com/webdev/314178.html
-
PHP installation
Date: 04/17/06
(PHP Community) Keywords: php, mysql, sql, hosting, apache
Hello, I have just recently contracted a Virtual Private Server account with a large hosting company. So far everything has gone pretty smoothly. I installed mysql and PHP and everything is running as it should. However when I installed PHP there was an option screen for me to choose what I wanted to install PHP with. I remember specifically choosing mysql support. However now when I try to run some of my pages I get this error: Call to undefined function: mysql_connect() in /usr/local/apache/htdocs/config.php on line 52
Which tells me that the mysql functions were not installed.
So to my question. How do I confirm that its not installed? If its not installed how do I install it?
Thanks.
Source: http://community.livejournal.com/php/439484.html
-
php's include function question
Date: 04/28/06
(PHP Community) Keywords: php, browser, html, web, apache
I currently have a paid webhost, which runs *nix, I have a web proxy script running on there and rather than calling the script directly, I use the
include('cgi-bin/proxy.pl'); ?> function to load it in an index.php file on my webserver.
Now I also have a local webserver, running Win2k3, Apache 2.0.55, the latest PHP, and Perl. (I'm not sure if its a misconfiguration on my part, or if theres something I'm doing wrong...) I setup everything, Installed the same proxy script (and when accessed directly, it runs exactly as it should,) But when I use the include('cgi-bin/proxy.pl'); function, It just returns the entire cgi script in plaintext exactly like this: #!/usr/bin/perl --## CGIProxy 2.0.1## nph-proxy.cgi-- CGIProxy 2.0.1: a proxy in the form of a CGI script.# Retrieves the resource at any HTTP or FTP URL, updating embedded URLs# in HTML resources to point back through this script. By default, no# user info is sent to the server. Options include text-only proxying# to save bandwidth, cookie filtering, ad filtering, script removal,# user-defined encoding of the target URL, and more. Requires Perl 5.## Copyright (C) 1996, 1998-2002 by James Marshall, james@jmarshall.com# All rights reserved.## For the latest, see http://www.jmarshall.com/tools/cgiproxy/### IMPORTANT NO
I've also tried using the full URL in the include path include('http://mysiteurl/cgi-bin/proxy.pl'); But that causes it to timeout, and gives the following errors:
Warning: include(http://mysiteurl/cgi-bin/proxy.pl) [function.include]:failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in D:\WebServer\htdocs2\public\index.php on line 5
Warning: include() [function.include]: Failed opening 'http://mysiteurl/cgi-bin/proxy.pl' for inclusion (include_path='.') in D:\WebServer\htdocs2\public\index.php on line 5
This also happens when I try to "include" any other file by the complete url... I'd like to figure out what's causing this, and why it can't read it from the complete url (all files I've tested, can be accessed fine via a web browser by the full URL, so I don't know why Apache / PHP is having a hard time with it.)
I'm not quite sure where the problem is, But the first way of calling it include('cgi-bin/proxy.pl'); Obviously works, it just doesn't execute the cgi script before displaying it (which my paid webhost apparently does) How does one accomplish this?
I'm by far no expert with PHP, I can piece together scripts and things, and do basic setting up, but this has really baffled me. :(
---Edit--- Here are some actual domains so you can see what I really mean:
My Webserver (Win2k3, Apache, PHP, Perl): The actual CGI Script (This runs fine): http://proxytest.dyndns.org/cgi-bin/nph-proxy.pl The PHP file using the include function to load the cgi script (Displays the actual CGI file in plaintext): http://proxytest.dyndns.org/proxy.php
My Paid Host (Pre-configured, running on *nix): The actual CGI Script (This runs fine): http://www.wolfstudios3d.ca/cgi-bin/nph-proxy.pl The PHP file using the include function to load the cgi script (Displays the processed CGI File, exactly as if accessed directly): http://www.wolfstudios3d.ca/proxy.php
Source: http://community.livejournal.com/php/445071.html
-
Top 10 Missing Java Features (or How Java Can Thrive in 21st Century)
Date: 05/05/06
(Java Web) Keywords: java, jsp, apache
This is a list of top 10 features missing in Java, features that I think will help Java survive and thrive in 21st century. As Java developers let’s take this occassion to raise our voice and let our demands be heard.
Apache-Java (JSP & Servlet) Module. Killing JServ project was probably the single biggest mistake which [...]
Source: http://blog.taragana.com/index.php/archive/top-10-missing-java-features-or-how-java-can-thrive-in-21st-century/
-
JSP / Servlet - PHP Integration Options
Date: 05/11/06
(Java Web) Keywords: php, apache
There are four different integration options in order of complexity and your requirements. They are as follows:
Multi-port Integration
Run Apache (with PHP) on default port 80 and Tomcat on default port (8080). They can run on the same machine with different ports without any problems whatsoever. This is the simplest procedure.
Single Port Integration (Apache Mapping)
In this [...]
Source: http://blog.taragana.com/index.php/archive/jsp-servlet-php-integration-options/
-
.htaccess question
Date: 05/11/06
(Apache) Keywords: apache
Can Apache track logins from a htaccess config? I see that if I supply a wrong password it will mention it in the error log [Thu May 11 09:39:33 2006] [error] [client X.X.X.X] user a not found: /documents/ But can it track successfull user logins?
Source: http://community.livejournal.com/apache/32301.html
-
Surfing on localhost
Date: 05/19/06
(Apache) Keywords: browser, apache
Hi all,
I need to be able to use localhost when I am not online,
When my browser sends a request to apache my firewall asks
do I allow apache http server to access the internet? destination IP: 10.1.1.1:DNS
Why would localhost need to access my router?
If I am not in the vicinity of my router, or I say no, I get
Forbidden You don't have permission to access / on this server.
Now how can I configure apache to not need to access my router?
thanks
Source: http://community.livejournal.com/apache/32577.html
-
Apache Web Server Suddenly Fails to Load With EMalloc Error - Solution (php_exif.dll)
Date: 06/01/06
(Java Web) Keywords: web, apache
The common symptom of the problem is that Apache web server suddenly fails to load as a service (on windows) or even from command line. The error message from log is as follows:
FATAL: emalloc(): Unable to allocate -2103443420 bytes
[Thu Jun 01 23:57:21 2006] [crit] master_main: create child process failed. Exiting.
In my case the [...]
Source: http://blog.taragana.com/index.php/archive/apache-web-server-suddenly-fails-to-load-with-emalloc-error-solution-php_exifdll/
-
The Mystery of Hanging Apache HTTPD Server and Solution
Date: 06/02/06
(Java Web) Keywords: apache
As I mentioned previously my Apache server was inexplicably hanging every morning (PST). And in panic I had to restart my VPS, whenever I could find it. It is clearly not an acceptable situation. And then I found the solution thanks to WestHost technical support.
Apparently my server’s maxclients parameter in httpd.conf (Apache configuration file) was [...]
Source: http://blog.taragana.com/index.php/archive/the-mystery-of-hanging-apache-server/
-
Grossly misconfigured, or just misunderstood?
Date: 06/03/06
(Web Development) Keywords: asp, web, linux, apache
I've been doing some contract work for my former employer, who has been having some major difficulties. Their webhost migrated them with little warning and no support from a shared account on a Linux Apache server to a shared account on an Windows IIS server running Plesk. They rely heavily on Perl/CGI scripts, and the migration naturally broke all of them, despite assurances that it would not.
So my job has been to get their scripts running again. However, this hit a major snag when I realized that their new server provides no server error logs. I've never worked with IIS before, but this seemed very wrong to me. Without the error logs, how are they supposed to debug their scripts? Numerous calls to the webhost's lackadaisical tech support were met with only incompetence (people who didn't know what server error logs were) and weak denials ("I don't think we can let you see those").
So I told my client that these people were incompetent, that their server was grossly misconfigured (a lot of other things that ought to have worked didn't work), and that the way they were being treated by the host was totally inappropriate for the price they were paying (as I understand it, an expensive corporate rate). I get 24-hour tech support with almost zero delay from my $10-a-month shared host, yet it takes these people several days to return a call about even the simplest of questions, usually with inadequate, unhelpful responses. It seems to me that these people migrated to IIS without having any clue what they were doing, and wheedled their ill-informed clients into following, despite their not having any need for IIS, ASP, or anything else related.
I managed to fix most of the scripts through blind trial and error, ugly hacks, and brute force. But I don't think they should be having to deal with this. However, I'm well aware that I don't know anything about IIS, and before I push the matter further, I wanted to make sure it wasn't my own incompetence that was getting in the way. Is there any reason why an IIS server shouldn't provide server error logs to shared clients? Is there some other way to debug scripts that I'm missing? Am I correct in assessing that this webhost is a sinking ship of fools, and in advising them to jump overboard before they go down with it?
Source: http://community.livejournal.com/webdev/326423.html
-
PHP Book
Date: 06/07/06
(PHP Community) Keywords: php, programming, mysql, sql, linux, apache
Hello Friends
I am a programmer in a Linux/Apache/MySQL/PHP shop. I also do some Windows programming in Delphi and have done lots of other stuff academically.
I'm looking for a book on PHP that will help me with "bigger picture" and "higher level" design considerations. I'm looking for a book that contains complete solutions and ideas for solving medium to large problems. Object-oriented designs are a big plus.
I'm also looking for a great reference manual.
I've been poking around looking at reviews, but I would like to have the opinions of some serious PHP programmers first.
Thank you!
Source: http://community.livejournal.com/php/458470.html
-
Can't get Apache to build with mod_perl! Argh!
Date: 06/11/06
(Apache) Keywords: linux, apache
Hello!
I'm attempting to build Apache with mod_perl and mod_ssl by hand. mod_ssl seems to have integrated nicely with the build process. However, upon compiling the mod_perl module, make fails.
Here is the command I used to configure mod_perl:
perl Makefile.PL \ EVERYTHING=1 \ APACHE_SRC=../apache_1.3.36/src \ USE_APACI=1 \ PREP_HTTPD=1 \ DO_HTTPD=1
While in /usr/src/apache_1.3.36, here is the command I used to configure Apache:
SSL_BASE=SYSTEM ./configure --prefix=/usr --with-layout=GNU --sysconfdir=/etc/apache --libexecdir=/usr/libexec/apache --localstatedir=/usr/var/apache --runtimedir=/var/apache/ --logfiledir=/var/log/apache --includedir=/usr/include/apache --proxycachedir=/var/www/cache --datadir=/var/www --enable-module=all --enable-module=ssl --activate-module=src/modules/perl/libperl.a --enable-module=perl --enable-shared=max --enable-suexec --suexec-caller=nobody
The error regarding mod_perl while in the make program is as follows:
===> src/modules/perl gcc -I. -I../../include -I../../include/regex -I../../include/../ -DLINUX=22 -DHAVE_SET_DUMPABLE -DMOD_SSL=208127 -DMOD_PERL -DUSE_HSREGEX -DEAPI `../apaci` -I`/usr/bin/perl -MConfig -e 'print $Config{archlibexp}'`/CORE `/usr/bin/perl '-MApache::ExtUtils=%Config' -e 'print $Config{ccflags}'` -DNO_PERL_DISPATCH -DNO_PERL_POST_READ_REQUEST -DNO_PERL_TRANS -DNO_PERL_HEADER_PARSER -DNO_PERL_ACCESS -DNO_PERL_AUTHEN -DNO_PERL_AUTHZ -DNO_PERL_TYPE -DNO_PERL_FIXUP -DNO_PERL_LOG -DNO_PERL_INIT -DNO_PERL_CLEANUP -DNO_PERL_RESTART -DNO_PERL_STACKED_HANDLERS -DNO_PERL_SECTIONS -DNO_PERL_METHOD_HANDLERS -DNO_PERL_SSI -DMOD_PERL_VERSION=\"1.29\" -c -o mod_perl_opmask.o mod_perl_opmask.c /bin/sh: line 1: ../apaci: No such file or directory In file included from ../../include/httpd.h:29, from apache_inc.h:120, from mod_perl.h:162, from mod_perl_opmask.c:1: ../../include/ap_config.h:73:16: error: os.h: No such file or directory make[4]: *** [mod_perl_opmask.o] Error 1 make[3]: *** [all] Error 1 make[2]: *** [subdirs] Error 1 make[2]: Leaving directory `/usr/src/apache_1.3.36/src' make[1]: *** [build-std] Error 2 make[1]: Leaving directory `/usr/src/apache_1.3.36' make: *** [build] Error 2
I'm really at my wits end trying to figure out why it won't work. I hope someone here can help!
Thanks!
Source: http://community.livejournal.com/apache/33703.html
-
Is Your Web Hosting Provider Robbing You?
Date: 06/15/06
(Java Web) Keywords: web, hosting, apache
No, I am not joking. I recently found out how my web hosting provider was depriving me (unintentionally I hope) of significant revenue per month by making my site inaccessible to large number of users daily. And the way it was done took me by surprise.
Apache server has an interesting directive called MaxClients. MaxClients sets [...]
Source: http://blog.taragana.com/index.php/archive/is-your-web-hosting-provider-robbing-you/
-
Top 10 Java SE 6 Features
Date: 06/18/06
(Java Web) Keywords: xml, web, apache
Web Services
You get first-class support for writing XML web service client applications (death of Apache Axis). No more messing with the plumbing (unless you really want to). You can also expose your APIs as .NET interoperable web services with a simple annotation.
For developers who want to handle XML directly Mustang adds new parsing and [...]
Source: http://blog.taragana.com/index.php/archive/top-10-java-se-6-features/
-
WordPress Dashboard Blank Page Display Solution
Date: 07/10/06
(Java Web) Keywords: php, apache
After moving over my test blog to the new server, I noticed that the Admin Dashboard (with tons of unnecessary feeds) wasn’t displaying. It shows just a blank page.
Apache error log had a very interesting message:
Allowed memory size of 8388608 bytes exhausted (tried to allocate 0 bytes)
The solution is simple.
1. Increase memory_limit in php.ini [...]
Source: http://blog.taragana.com/index.php/archive/wordpress-dashboard-blank-page-display-solution/
-
Dreamhost and include()
Date: 07/12/06
(PHP Community) Keywords: security, apache
I just switched over to Dreamhost, only to discover that they've disabled allow_url_fopen in the name of security. While I appreciate the effort, my last host apparently didn't care, and I rampantly abused includes. I still do it with my various Apache installs. Anyway, I've spent the last four hours de-including my site using the curl workaround available through the Wiki. I happened to enjoy my includes for debugging purposes, and adding four lines for each one was a bit burdensome (I enjoyed them that much).
My question for you all is, why bother disabling allow_url_fopen? I just don't understand what all the worry is about. Thanks!
Source: http://community.livejournal.com/php/469239.html
-
How To Solve Apache Ant java Task Execution Errors
Date: 07/26/06
(Java Web) Keywords: xml, java, apache
I have seen myriad errors when executing java task. For example I have seen: javax.xml.parsers.FactoryConfigurationError?: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl? not found when executing the java task in jdk1.5.0
The problems with debugging the errors is that the commandline used by java task is not visible, even in verbose mode.
The solution to both the problems is to add the [...]
Source: http://blog.taragana.com/index.php/archive/how-to-solve-apache-ant-java-task-execution-errors/
|