I have been a web developer using PHP for years now, and my work laptop runs CentOS with PHP5 as an Apache Module. This suits me just fine for development, but now I want to setup a web server that runs PHP 4.4.8 and PHP 5.2.5 and offer hosting to people. I know PHP4 is very old, but I am looking to offer my users the freedom of choice, as there are still third party applications out there that may need to be run on PHP4.
I will want PHP 5 to be the default, and allow PHP 4 to be used if either the file extension is .php4, or they have a line in their .htaccess file. I have seen various tutorials in search engine results saying to run both, I can either do one of the following:
1. Install PHP5 as a module, and run PHP4 using FastCGI 2. Install PHP5 and PHP4 and run both using FastCGI 3. Install PHP4 as a module, and run PHP5 using FastCGI
In the future I will also be looking to support PHP6 once a stable version has been released, though that will probably be optional to begin with and require a line in the .htaccess file too - like PHP4. I will be using Apache 2.2.8 on CentOS 5.1. I am also looking to install Ruby on Rails and Django too, which I think use FastCGI.
What's the difference between running as an Apache Module, or using FastCGI? This will be for a shared hosting environment so performance over lots of connections, stability and security are my concerns. Should I run everything using FastCGI, if not, would the default PHP version be better off installed as an Apache Module?
whenever one of my customers tries to install an application from the application installer, they get an error that looks like this.
Error: Installation of WordPress at http://*******.com/wordpress failed. Non-zero exit status returned by script. Output stream: 'PHP Warning: mysql_connect(): Access denied for user 'ndari_wordpres_7'@'aeris.jdrepo.com' (using password: YES) in /opt/psa/var/apspackages/apscatalogSTqEEM.zip7b3ca133-9714-5d/cache/scripts/db-util.php on line 66 '.
Error stream: 'PHP Warning: mysql_connect(): Access denied for user 'ndari_wordpres_7'@'aeris.jdrepo.com' (using password: YES) in /opt/psa/var/apspackages/apscatalogSTqEEM.zip7b3ca133-9714-5d/cache/scripts/db-util.php on line 66 '.Click to expand...
I'm trying to integrate the websocket into existing application.Based on my search, i found a websocket module to do this, but it isn't updated yet. URL...
Any chance that the module will be included in Apache ? Also i found in StackOverflow conversation that Apache httpd wasn't design to maintain persistent connection, is that true ? Using WebSocket on Apache server. Should continue using Apache websocket module or using separate websocket server ?
I have Apache 2.2 installed on Windows to host a web2py application using wsgi.
Apache crashed once stating it had run out of worker threads, so I inscreased ThreadsPerChild to 500. It has since crashed/become unresponsive without giving anything in the error log.
I set up mod_status, and am looking for understanding what I see when looking at server-status page.
It says 135 requests currently being processed, 365 idle worker. However I don't think there are 135 people connected.
Here's the request lines:
SrvPIDAccMSSReqConnChildSlotClientVHostRequest 0-1253840/0/0W138495448300.00.000.00 ... the line above is repeated identically 125 times 0-1253840/32/32W000.00.460.46127.0.0.1dalgety-svr8.havelock.intGET /server-status HTTP/1.1 0-1253840/0/0W52400.00.000.00192.168.202.109dalgety-svr8.havelock.intGET /HubForms/ProjectFolderIndexing/index HTTP/1.1
[Code] ....
Question:
1) What are those 125 requests, and why are they not exiting. Are they anything to worry about? why is there no Client/VHost/Request? Could they be from the python process? Could they be what's causing the issue?
2) The Acc entry 0/121/121 on /HubForms/capacity_requests/index - is this representative of an issue?
3) When I restart Apache, it typically says "Terminating 375 threads that failed to exit" but that number doesn't match up with anything. Are these the idle threads?
Also I'm not sure what "restart" actually means, i.e. what stops and what stays (i.e. why am I on generation 0-12?).
4) Is any of this anything to do with why Apache becomes unresponsive, or should I be looking elsewhere?
I'm trying to perform SSO to my application. for my login i get an error "Size of a request header field exceeds server limit". I believe the header size got increased then the limit set in apache server. I'm guessing so.
the flow of request: Apache -> tomcat -> SAP Business Objects.
For my colleagues login the SSO works fine with out issue.
So, how to increase the HTTP header size. I'm bridging apache and tomcat using AJP connector. below is the AJP connector parameters in server.xml
Code: [root@ns1 conf.d]# cat /etc/httpd/conf.d/php.conf # # PHP is an HTML-embedded scripting language which attempts to make it # easy for developers to write dynamically generated webpages. #
LoadModule php5_module modules/libphp5.so
SetOutputFilter PHP SetInputFilter PHP
AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps This prevents file.php.gif from executing in a non-chrooted site, but in my chrooted sites, file.php.gif will execute as a PHP file. Any idea why? Some other config I have to change?
how I can execute memtest86 remotely without any KVM access. Is this possible? If so, how would I go about it? I run Debian 5.0 32bit with bigmem kernel (16x4GB Dimms)
i have a vps account and am trying to setup my website i installed php 4 from a control panel where it auto installed php and there is mysql and i installed all of them but when i upload my script and go to install or go to the index of my site it shows the php code and does not execute.
my permissions are right on i also made a testphp file and used this code <?php phpinfo(); ?> and still nothing just shows the php code when you browse to the file i even went further i installed from the control panel another program called phpmyadmin and when i log in it does the same thing just shows php code so what the hell is going on you think i need to contact my host provider for this issue i sent an email out but waiting for a responce
im trying to write a script interfacing to WHM again via remote access key. What I want to achieve is to remove an ip from iptables. using PHP script (CURL), any thoughts on how i can remove an ip from iptables? I know the ssh command how to do it but i dont know if it will work via a PHP (CURL) script connecting to WHM via remote access key.
So I need to execute a list of commands via a cron job rather than having the script 'wait' for the shell to finish processing (as this was leading to time outs and all sorts of issues).
I'm guessing the way to do this is to have my php set up a cron job to occur at some point in the near future (like current time + 1 min), then to prevent the job from repeating the next hour, it removes itself from the cron list as the final command.
Does this sound like a reasonable way to go about executing a queue of shell commands from the browser that take an indefinite (possibly long) amount of time?
I've been concerned about executing commands through (./) using php and perl shells on the server
a new way of hacking these days is using perl shells , even if the perl was terminated on the server ,, or was forbidden for users hackers upload a (perl) program to the server to use it instead of the server's own perl
any way ,,
chmoding the (ls-cat-more-less) to 4750 seems to give permission denied when exeuting these programs on the server but the hackers also found that they could upload their own ls-cat-more-less programs and use them instead of the server's
they also could rename them ls==>ki or anything and use them like this
./ki /etc/valiases -alXrt and the commands work like charm for them
./ <<--- this command uses the sh program on the server ,, ((sh which refers to bash on most servers)) so
./ki is the same as
sh ki
and
bash ki
so i tried chmoding sh with 4750 and that killed the exploit
i was concerned about cpanel's and the website's functionality so i tried changing an accounts password and creating a database ,, they both worked fine
so ,, if u thing chmoding 4750 sh is a bad idea please let me know
and if you know any other ways of disabling all the perl scripts on the server
A very simple shell script that rotates log files of lighttpd server everyday becomes zombie after executing via cron. If executed directly in the shell it just dies normally. Tried to add "exit 0;" in the last line but the same effect...
An important notice: the script stops and starts the server, maybe it dies abnormally because it forks a process (lighttpd)?
I have a new dedicated server and am trying to set up a cron job via CPanel on on of my accounts (we'll call it "abc" account).
In the Cron job area, where it asks for the command to run, I enter this:
/home/abc/public_html/forum/class/sendnotice.php
But when the job runs, it doesn't seem to be executing the .php file. Instead, I get stuff like this via email:
/home/acb/public_html/forum/class/sendnotice.php: line 1: ?php: No such file or directory /home/abc/public_html/forum/class/sendnotice.php: line 2: ////////////////////////////: is a directory /home/abc/public_html/forum/class/sendnotice.php: line 3: //: is a directory /home/abc/public_html/forum/class/sendnotice.php: line 4: //: is a directory /home/abc/public_html/forum/class/sendnotice.php: line 5: //: is a directory /home/abc/public_html/forum/class/sendnotice.php: line 6: //: is a directory /home/abc/public_html/forum/class/sendnotice.php: line 7: //: is a directory /home/abc/public_html/forum/class/sendnotice.php: line 8: //: is a directory /home/abc/public_html/forum/class/sendnotice.php: line 9: //: is a directory
So it is as if the cron job is reading each line of the .php file instead of just running it. Am I doing something wrong in setting up the cron job to run that file or could it be a configuration issue with the new server?
how I might be able to execute a Linux command by sending a text message to some email address? Where if that email address gets a message (either any message, or perhaps only messages containing some password), a Linux command is executed, e.g.
I just setup an instance of Apache on Windows with SSL and it starts by running "httpd.exe", but I can't get it to start as a service. It was running fine before adding the SSL certificate/key pair.
This is the error, I get as a Service:
Quote:
[Wed Aug 15 11:22:09 2007] [info] mod_unique_id: using ip addr 10.254.1.135 [Wed Aug 15 11:22:10 2007] [info] Init: Seeding PRNG with 144 bytes of entropy [Wed Aug 15 11:22:10 2007] [info] Loading certificate & private key of SSL-aware server [Wed Aug 15 11:22:10 2007] [error] (OS 5)Access is denied. : Init: Can't open server certificate file C:/Apache2/conf/ssl/NBCDDSARP10.dev.npe.tic.cert
This is what happens when I run it via "httpd.exe"
Quote:
[Wed Aug 15 11:27:08 2007] [info] Init: Seeding PRNG with 144 bytes of entropy [Wed Aug 15 11:27:08 2007] [info] Loading certificate & private key of SSL-aware server [Wed Aug 15 11:27:08 2007] [info] Init: Generating temporary RSA private keys (512/1024 bits) [Wed Aug 15 11:27:08 2007] [info] Init: Generating temporary DH parameters (512/1024 bits) [Wed Aug 15 11:27:08 2007] [info] Init: Initializing (virtual) servers for SSL [Wed Aug 15 11:27:08 2007] [info] Configuring server for SSL protocol [Wed Aug 15 11:27:08 2007] [info] Server: Apache/2.2.4, Interface: mod_ssl/2.2.4, Library: OpenSSL/0.9.8e
It's been happening on both my old and new server, was really hoping this would be fixed.
Basically, the httpd/apache service crashes or goes down making domain names and sites unable to load; although cPanel/WHM still accessible. This would go on for about 5 minutes OR until I restart httpd in root.
sites simply do not load or just timeout after a period of time.
This has become extremely annoying for both me and my clients because it makes it seem like we have downtime.
I have been using Apache 2.2.23 VC9 ssl 0.98 on my windows 7 32 bit PC. I decided to remove the 2.2.23 release and install 2.4.3 VC9 version yesterday. After installation, I was able to run Apache by running httpd.exe from command line. I can also install Apache service using "httpd -k install" with no problem. However, when I tried to start Apache service using "httpd -k start", it didn't work for me. Starting Apache from apachemonitor also failed. I checked error.log and found the following output:
Starting the Apache2.4 service [Mon Feb 18 19:00:33.498207 2013] [mpm_winnt:crit] [pid 7564:tid 376] (OS 1053)The service did not respond to the start or control request in a timely fashion. : AH00378: Apache2.4: Failed to start the service process.
I am using windows 2008 R2 64 bit O.S, I downloaded httpd-2.4.10-win64-VC11 and tomcat-connectors-1.2.39-windows-x86_64-httpd-2.4.x and I created 3 tomcat workers and then I configured workers.properties and httpd.conf.
After complete setup when i tried using
http://localhost then
I got It works! message (looks everything is fine).
and then I have deployed my sample web application I tried to access the same application then using
http://localhost/SampleCluster
I am getting
503 service not available.
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
I encountered a strange problem when installing apache 2.2 or 2.4 as a service and set the service to be automaticly started.On restart of windows, apache service crashes with an access violation.
Installed Apache Server 2.4.3 (no PHP, etc.) and it was working beautifully for a week or so. Yesterday, I restarted my laptop (nothing changed... no updates that install automatically, etc.) and now Apache won't start. Here are some things I've found out on my quest on figuring out what's wrong:
1. Apache Error Log: [Sat Jan 05 14:18:36.745977 2013] [mpm_winnt:notice] [pid 4116:tid 372] AH00455: Apache/2.4.3 (Win64) configured -- resuming normal operations [Sat Jan 05 14:18:36.745977 2013] [mpm_winnt:notice] [pid 4116:tid 372] AH00456: Server built: Aug 18 2012 14:13:48 [Sat Jan 05 14:18:36.745977 2013] [core:notice] [pid 4116:tid 372] AH00094: Command line: 'C:Apache24inhttpd.exe -d C:/Apache24' [Sat Jan 05 14:18:36.747979 2013] [mpm_winnt:notice] [pid 4116:tid 372] AH00418: Parent: Created child process 3436 [Sat Jan 05 14:18:37.335418 2013] [mpm_winnt:crit] [pid 4116:tid 372] AH00419: master_main: create child process failed. Exiting.
2. Nothing else is using port 80 (or 443, for that matter).
3. Apache will start and stay running if I run httpd.exe from the DOS prompt or double-click it from within Windows just fine.
4. Will not run when launched from within the Services or Apache Service Monitor app.
5. Windows Event Error displays the following error: Faulting application name: httpd.exe, version: 2.4.3.0, time stamp: 0x502f863e Faulting module name: MSVCR100.dll, version: 10.0.40219.325, time stamp: 0x4df2bcac Exception code: 0xc0000417 Fault offset: 0x0000000000070468 Faulting process id: 0x13d8 Faulting application start time: 0x01cdeb8eefaec475 Faulting application path: C:Apache24inhttpd.exe Faulting module path: C:WindowsSYSTEM32MSVCR100.dll Report Id: 2deab70b-5782-11e2-be94-00247e17b5d9 Faulting package full name: Faulting package-relative application ID:
6. I've tried fixing/reinstalling the C+ redistribution files about 3 times now, to no avail (thinking the error in the event file was caused by a bad/corrupt MSVCR100.DLL).
7. The exception code in the event error is: 0xc0000417 = STATUS_INVALID_CRUNTIME_PARAMETER = An invalid parameter was passed to a C runtime function. (But again, reloading the files didn't solve anything).
8. I have tried removing Apache completely, reloading with default settings, etc. and still having the same issue.
9. Out of desperation, I even tried a registry cleaner (CCClean) and CHKDSK on the drive. Both of those didn't fix anything.
This is it... not sure what else to do/try. Again, everything was fine one moment, and it all stopped working after rebooting my system. I've wasted hours into this issue, and have come up empty handed. I'm beyond frustrated at the moment.
EDIT: The download I used for the server is located here: [URL]...
I am using the latest version of Apache on an Windows XP machine
When my web service is down for maintenance, since Apache is will still be up and running, I would like for Apache to serve an xml file as a response for the appropriate request. I have three operations available, makePayment, calculateFee, and voidPayment.
Is it possible to have Apache determine what type of request is made for example if I have an xml error page for each operation; how will Apache know which xml file to serve based on the operation request from the client
To make it more clear: What is the best practice for modifying apache to know what request is being made in order to serve the appropriate xml file?
*My computer is a computer of a 500 computers network within our company.
* i have been given a STATIC local intranet ip 192.168.10.168 assigned by our IT department via their router.
* i have the internet facility provided through the above mentioned intranet for which i get a dynamic ip ex: 188.54.208.205, 176.44.107.21
* i have installed WAMP server.
my current project for the company i am doing should be able to access via internet in addition to the local access. local access is the primary access method. so now i have installed a free dns service like dyndns. at the setup of that, i have choosen a free subdomain ex: my.freedns.com they offer. then i assigned the ip ex:188.54.208.205. also installed their desktop client for monitoring ip changes auto updates.
Now the problem is : when i hit my.freedns.com the page displaying is of our internet service provider. not of my project homepage . How can i fix so when i issue above subdomain it will show my webserver default page?