Is there a way to figure out which user it is that executes a php-script in a webserver using php-commands? (I don't have shell access to the server running httpd, so I cant use ps.)
I have CentOS server ( Server version: Apache/2.2.15 (Unix) Server built: Feb 13 2012 22:31:42 ) with mod_fastcgi.x86_64(2.4.6-2.el6.rf) and php 5.3.3.
some sites not work on fastcgi mode.
In apache error.log:
[Mon Sep 03 19:20:37 2012] [warn] [client 80.*.*.*] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Mon Sep 03 19:20:37 2012] [error] [client 80.*.*.*] Premature end of script headers: index.php
Can anybody tell me how solve this?
I don't even know where to begin to be honest.
Trying to use an external API that requires SSL connections, I discover that SSL in needed on cURL, but this (apparently) requires PHP to be reinstalled and compiled with cURL / SSL support.
Not really experienced with compiling PHP, and I'm not sure if our server even has make or build, the only luck I've had is with rpm's before.
This really isn't in my job description. Any help most most welcome!
Hi I use to debug with zend studio 7 with inner Web browser without new window open in firefox or another default browser I have now netbeans PHP 6.8 (on Ubuntu) because it free and good editor.
Can Nebeans debug with inner Web browser inside netbeans 6.8 PHP?
Thanks
I recently upgraded my main development laptop to Lucid. Lucid upgraded PHP to 5.3 and as I'm mainly a PHP developer, this has caused quite a few problems. What's the easiest way to revert back to the the 5.2 series? Googling hasn't found any good solutions.
I trying to find the best way to upgrade from PHP 5.1 to 5.3. The CRM software I am running on this server requires this upgrade or else I probably wouldn't even perform it, because it seems like it's going to be perhaps trickier than I hoped it would be. Being still new to the programming world, these routine upgrades are still worrisome to me.
I am running apache 2.2.6 (Fedora), PHP 5.1.6 and MySQL 5.0.27 on this server.
Hello,
I have a php script that writes to a file.
But when I try to actually write to the file I get permission denied.
How can I tell what user name I need to add to the file permission in order for the php to write to it?
Thank you.
I have tried PHP's ftp_site($ftpStream, 'chgrp nobody '.$directory) but I cannot get it to work. Does anyone out there have any success changing a directories group via ftp_connect() in PHP? Thanks.
I'd like to be sure that cpanel/WHM is definitely NOT going to automatically update my PHP to 5.3 (it will cause all sorts of errors for legacy code).
So, please let me know where I should look (either in WHM control panel or via SSH) in order to satisfy myself that PHP definitely won't get upgraded to 5.3 without my say-so?
I'm running PHP through mod_fastcgi & mod_suexec, and I added Header set X-UA-Compatible "IE=edge env=best-standards-support" to my .htaccess file. It works fine for static content, but the PHP files lack the header. How do I fix this problem?
Hello,
I need to upgrade PHP to 5.2.x
Im referring here as how to do upgrade it:
http://wiki.centos.org/HowTos/PHP_5.1_To_5.2
http://www.securityhacking.tk/2010/02/install-upgrade-php-5-1-to-5-2-centos-5-4/
But that was testing repository. Is it safe to use it on live server?
Thank you.
I am using the lib ssh2 module with PHP and calling the function ssh2_fingerprint() to get the keys fingerprint. According to all resources on the internet, I can get the fingerprint of a public key by executing:
ssh-keygen -lf id_rsa.pub
Which outputs something like:
2048 d4:41:3b:45:00:49:4e:fc:2c:9d:3a:f7:e6:6e:bf:e7 id_rsa.pub (RSA)
However, when I call ssh2_fingerprint($connection, SSH2_FINGERPRINT_HEX) in PHP with the same public key I get:
dddddba52352e5ab95711c10fdd56f43
Shouldn't they match? What am I missing?
I see there are thousands of files in my "/tmp" directory (a CentOS machine) and almost all of them are PHP session files.
I'm worried about the possible impact this might have on my system.
Are those files ever deleted either by the OS, Apache or PHP? or I have to take care of it myself?
Hello serverfault,
I would like to enable the PUT and DELETE methods to any .php script on my Apache web server.
Currently I only have this answer :
The requested method PUT is not
allowed for the URL /something.php
I'm running Apache2 / PHP5 on a Debian lenny.
I am running mac 10.6.4 on an iMac and am using it as a developer server.
I have Apache and Entropy php5 installed, when i write my applications, some pages wont run when php has errors, however these are not recorded on a log file, I created one php_errors.log and entered the following on the php.ini file
error_log = /usr/local/php5/logs/php_errors.log
However errors are not written to this file and i have
log_errors = true
What could be the problem
I don't even know where to begin to be honest.
Trying to use an external API that requires SSL connections, I discover that SSL in needed on cURL, but this (apparently) requires PHP to be reinstalled and compiled with cURL / SSL support.
Not really experienced with compiling PHP, and I'm not sure if our server even has make or build, the only luck I've had is with rpm's before.
This really isn't in my job description. Any help most most welcome!
i have installed on my server and home server (xampp) memcached with the extions memcache.so / memcache.dll (MemCache)
and today i noticed that it gives MEMCACHED too, and i need to run memcached cause of the memcached command "append" which dont supports memcache
i googled all the day but didnt find any tut how to install memcached for php (most tuts are for memcache and not for memcached)
Can somebody help me with this problem (i want install it on my centos server and on my windows xampp server) My php version is 5x
Thank you very much!
I have just installed CENTOS 6 on an internal network with no Internet Access.
Not very familiar with LINUX/CENTOS, I managed to get httpd service started and I believe PHP wasn't installed.
As the machine is not connected to the Internet, it will not be able to use YUM directly. How do I go about installing PHP and their dependencies, or the only way is to download the source codes and build it on my own?
I'm unable to find the directory listing of all PHP packages. I'm basically looking for the latest stable version of 5.3 utilizing some sort of script that will go out and check PHP's website.
If I can get a directory listing (can't seem to find one), I can do the rest.
Figured it out but seeing that someone else posted something similar but for Apache, he got blasted for puttig it on Stackoverflow. I figure I would save myself the trouble and post it here.
I've posted the following question to SO, but thought there might be a server based solution.
http://stackoverflow.com/questions/9053964/php-script-with-sleep-does-not-exit-on-connection-close
I'm running an Ubuntu VPS to run this script, and I'm trying to get the script to die when the user closes the window/tab of his browser.
There are several PHP based functions to see if the connection is still open, but none works (trust me, tested them all).
Any creative ideas on how I can do this through the server maybe?
can any one please let me know the global declaration of php variables..i have seen one among the site like..
for integer start with i, eg: $iItemId
for array start with a, eg: $aItemIds
for string start with s, eg: $sItemName