PHP is a widely-used, general-purpose scripting language that is especially suited for web development.

learn more… | top users | synonyms

1
vote
2answers
936 views

How can I get crontab to use a different PHP installation location?

I have a MAMP setup which runs PHP 5.3.5 on my Mac OS X 10.5 computer. I am trying to install a crontab that executes a PHP script, which is located on my MAMP server. I can only get the crontab to ...
4
votes
2answers
588 views

apache and php Segmentation fault [closed]

I have recently migrated to Archlinux. I installed Apache, php and mysql according to the Arch Linux LAMP wiki page. Now I have setup a virtual host for my new Symfony project. For every request I ...
3
votes
1answer
103 views

Where to securely place files needed by PHP in Linux filesystem (according to FHS)

I have a PHP script running on my LAMP server that requires certain files in order to produce HTML content. The script is publicly accessible (i.e. http://example.com/script.php) but the files ...
2
votes
1answer
82 views

PHP Bash error suppresion

I'm using a PHP script from cli, the script calls exec() a few times. There are some minor errors sometimes, which are handled by the PHP script. I'm suppressing the errors by appending 2>/dev/null ...
-4
votes
1answer
772 views

Changing IP address of Apache server using PHP statically

I want to statically assign the IP address of my Arch linux using php. I want to change the IP by using netmask,interface,broadcast,address & gateway. The user puts up the values into a html page. ...
0
votes
4answers
458 views

Create shortcut for PHP

I have XAMPP installed and my PHP is: /opt/lampp/bin/php-5.3.8 Every time I need to execute a PHP file I need to do this: /opt/lampp/bin/php-5.3.8 testando.php Is there another way to execute it ...
2
votes
0answers
959 views

Nginx Owncloud 4 produces “No input file specified.”

I'm trying to setup an Owncloud 4 instance with nginx as a webserver. The host device is a Raspberry Pi with preinstalled Debian 6. When I try to open the URL to the Owncloud installation in a ...
1
vote
1answer
1k views

Connect to a remote mysql server with bash php or perl

What is the best and lowest resource way to connect to a remote mysql server (server1.example.com) and execute queries like INSERT into SERVICES (user, id) ($user, $id) from server2.example.com? ...
1
vote
5answers
1k views

Start/stop program from website

I have some users on my machine that I allow to run small Mumble voice servers. I would like for them to be able to start/stop their voice server from a website (being ran by Apache). With the current ...
3
votes
2answers
4k views

Unable to install the php-posix package on CentOS 5.6

I have the following PHP packages installed on my CentOS 5.6 host and I am trying to install php-posix. When I run yum install php-posix I receive an error saying that php53-common conflicts with ...
6
votes
3answers
242 views

Can I install PHP on a Chumby One?

I'm enjoying hacking my Chumby One. However, I'd prefer if I could run PHP on it. I have perl and python installed. Does anyone know if I can compile PHP for it or if there is a ready made distro for ...
1
vote
1answer
971 views

Email sent from web server using PHP does not arrive

I am trying to send email via my web server using PHP but for some reason the email never arrives. According to PHP the email was sucessfully sent but I never receive the email. I know its not a spam ...
4
votes
2answers
747 views

How to set secure permissions for multiple users and multiple websites?

On a Gentoo 3.2.12 server with apache2+php, there are several websites running: /www /website1 /website2 ...etc The apache user should have read-only access to all the websites. There ...
2
votes
0answers
507 views

proper permissions under HTTP root with Apache2 + FastCGI + Suexec

I currently have a setup which runs Apache2 + FastCGI PHP + Suexec. As an example, I'm using /mnt/data/www/vhosts/inflex.co.uk/htdocs as a DocRoot for one of my virtual hosts. I have a script ...
0
votes
2answers
468 views

Removing a long string from php files - using grep and sed?

I have encountered some malware on my Linux server, and am trying to remove it from many php files. I've tried endlessly with grep | sed and grep | tr and couldn't even erase a simple text string, ...
1
vote
2answers
725 views

How to meet required dependencies in order to install expect pecl extension on Mac OS X?

I am attempting to install the expect pecl extension. OS version = 10.7.3 PHP version 5.3.10 installed via macports expect version 5.45 installed via macports The command I am executing: ...
1
vote
2answers
4k views

Giving PHP permission to write to files and folders

UPDATED FOR FURTHER CLARITY: According to http://expressionengine.com/user_guide/installation/installation.html, it says: For most Unix hosts the following is typical, but you may check with your ...
2
votes
2answers
440 views

Turn a bash and php script into a distributable rpm

I'm semi unix knowledgeable and I want to be able to call down an rpm from my server, run it with something like rpm -i , and have access to the script anywhere. The script is a combination awk and ...
2
votes
2answers
172 views

What should I teach in my Linux class? [closed]

I'm teaching a basic Unix class using Ubuntu. We've already covered basic Unix stuff such as: bash shell scripting file and directory permissions filesystem hierarchy common commands I would like ...
0
votes
2answers
530 views

phpmyadmin 403 error

i mannually installed phpMyAdmin according to this doc:quick install.but i keep getting the 403 error, i can successfully get into other folders in the root dir, how can i sovle this? here is my ...
1
vote
1answer
103 views

Disable tab autocompletion in interactive mode

I have set disable-completion on in my ~/.inputrc, however this doesn't affect php in interactive mode (php -a). I would like to copy some code from another editor to the php interactive shell which ...
1
vote
0answers
322 views

Debian: Upgraded to php 5.3 and lost phpcli, php-pear, etc

I upgraded to PHP5.3 using this tutorial: http://www.debiantutorials.com/how-to-install-upgrade-to-php-5-3-on-debian-lenny/ It removed the following packages: Removing php-pear ... Removing ...
6
votes
4answers
2k views

Case-insensitive file system for production server?

The initial situation looks like this: The corporate software is PHP-based. It is delivered by Apache 2 on a Windows 2003 Server. It is big. It is a legacy of rather unprofessional developers who ...
0
votes
1answer
875 views

How to easily maintain the latest versions of Apache/ MySQL/ PHP on CentOS 6.2?

We have a few servers running CentOS 6.2 deploying web applications using Apache/ MySQL/ PHP. In the past we've just regularly run "yum update" to keep all the software up to date. As of right now ...
0
votes
2answers
631 views

How to check that ssh login was successful in a script?

I do run ssh server "svn info /path/to/codebase" from php. It works fine but I wan to know how to check if the ssh login was not successful. I want to check from my php script that ssh server is up ...
1
vote
1answer
1k views

Why don't I see the XAMPP page on Linux Mint?

I am trying to install PHP MySQL on Mint 12. I downloaded and installed XAMPP. According to the tutorial, when I go to localhost in a browser I should see this: Instead, I see: It works! This is ...
2
votes
0answers
1k views

MySQL socket and PHP (and other languages)

Background info I'm currently running CentOS (or Red Hat?). uname -a gives (I edited out my domain name) Linux XXXXXXXXX.com 2.6.32-71.29.1.el6.x86_64 #1 SMP Mon Jun 27 19:49:27 BST 2011 x86_64 ...
0
votes
1answer
303 views

php mail not working in rhel server?

I have installed roundcube mail and when it tried to use installer which uses php mail it is loading for 5 to 10 minutes and then telling me 'ok' but no mail comes to me. smtp_port is 25 host is ...
13
votes
2answers
42k views

What user should apache and PHP be running as? What permissions should /var/www files have?

I just spun up an Ubuntu 11.10 box and then ran apt-get install apache2 php5 to install apache2 and PHP 5 on the box. Now it is functioning as a "web server" and it loads the "It Works!" page. Now I'm ...
3
votes
3answers
1k views

Trying to update php on CentOS 5.7

Apologies in advance - I'm not a good Linux user by any stretch of the imagination. I have a CentOS 5.7 dedicated server on which I host a few websites. I currently have php 5.2.10 installed, but ...
1
vote
2answers
532 views

How to recover a utility. (Accidentally Deleted /usr/bin/php file)

New Linux user. I accidentally overwrote my /usr/bin/php file. The php command no longer works. What's the best way to recover that file? Using bash and Linux Mint distro.
1
vote
2answers
580 views

run script asynchronously / in a different process

I have a simple php script <?php for($i=0;$i<10;$i++){ sleep(1); echo $i; } Which I run from the command line php myfile.php & I would expect I can do other things in the command line, ...
0
votes
2answers
390 views

suphp directory not owned by user

I have an odd problem with suphp. I have logged in as tom and added some php to a directory in my web server. Now I'm getting this error: Directory /home/.../web/public_html is not owned by tom I ...
2
votes
2answers
1k views

Update phpmyadmin manually when installed as an package

Is it possible to manually update phpMyAdmin when I installed it as a package? The current version in Ubuntus package list is 3.4.5deb1 but I want to upgrade to 3.4.8
1
vote
1answer
584 views

redhat oauth.so missing

I tried to put the oauth on my redhat server, but since I got this message : PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/oauth.so' - /usr/lib/php/modules/oauth.so: ...
1
vote
1answer
1k views

How to remove Apache from CentOS while keeping php 5.3

I have a problem with removing Apache from my CentOS install. First of all I installed lighty (lighttpd) and then I tried to install php53 which httpd was included with it. I've configured lighty ...
1
vote
1answer
743 views

Backup Manager and Cron : CentOs and Ubuntu 11.10

I have two dedicated servers: one has CentOS, the other Ubuntu. I installed backup manager on both servers. But I have two different behaviors. On CentOS: The backup of my files is "every night". I ...
3
votes
2answers
624 views

Installing php-cgi under Ubuntu for Cherokee web server

I have set up Cherokee web server on my server, and want to enable PHP and MySQL support for applications like Wordpress and phpBB. I have tried running these commands: sudo apt-get install php5 ...
1
vote
3answers
2k views

Troubles installing php with MySQL support

So I wasn't sure if this question would go best here or on Overflow or Server Fault, but decided to try here first. I'm installing LAMP on a VPS, and am running into issues configuring and building ...
2
votes
1answer
334 views

How can I monitor the load of a php script on a server?

We've got a website on our dedicated server which seems to be causing problems. Recently it has been crashing our dedicated server - it's very annoying. It will crash at random times. The tech ...
3
votes
1answer
1k views

Why am I getting a Non-existent class error in PHP on Fedora?

I've set up an Nginx/PHP (both installed from Yum) environment on my Fedora 15 install, but I've run into a strange issue. I have some projects that use Codeigniter (1.6), but they keep getting the ...
1
vote
2answers
321 views

process works without ampersand but doesn't work with ampersand

I wrote a small script to run as a daemon, everything seems to work when I run the command in unix: php script.php everything seems to work correctly, when I terminate that script and us the ...
1
vote
1answer
661 views

cURL on Linux not compiled, although installed

cURL is not compiled into PHP. I'm running: [root@vps ~]# cat /etc/issue CentOS release 5.7 (Final) Kernel \r on an \m Then I execute yum install curl and yum install php-curl. Then: [root@vps ...
0
votes
1answer
586 views

Init Script initializing daemonized process, but won't return [ok]

I'm new to init scripts, but the one I'm using I've copied almost verbatim (I did have to change a few things around from the source I found to work with Fedora). The daemon initializes fastcgi just ...
5
votes
1answer
117 views

Vim syntax highlight certain lines

I have php files well any file type in general that I would like vim to highlight here docs sections using a different syntax highlighting. <?php echo <<<HTMLDOC <h1> I am ...
2
votes
1answer
859 views

Getting PHP fatal errors in vTiger while logging from a normal users [closed]

I am getting the error below and notices in Apache logs when I am trying to login with any normal user on vTiger although admin user is working fine and able to see everything as expected. Below are ...
2
votes
1answer
2k views

Install php_http on Arch Linux

First I installed the curl extension for PHP: $ sudo pacman -S php-curl and $ grep curl /etc/php/php.ini extension=curl.so Then I installed the PHP PEAR $ sudo pacman -S php-pear Having now ...
9
votes
2answers
335 views

Vim, context-sensitive comment/uncomment behavior

I edit a lot of PHP code with Vim, and I've run into a snag with some macros in my .vimrc. I currently use these two macros to comment/uncomment in C-style "c-style (//) comment (press the [.] key) ...
1
vote
2answers
355 views

PHP package won't install correctly

Yesterday I did apt-get upgrade on my Debian/testing and broke a php5 package. I even tried to remove & purge with apt and dpkg clean apt cache. When installed again clean, it fails with ...
2
votes
2answers
8k views

Executing a shell command from PHP with shell_exec

Included in my thesis is to create an administration interface, in which an administrator can approve users whom have asked for access to use OpenNebula. Upon approval the users should be added to ...