[PHP-INSTALL] PHP Installation problem
Hello, I'm having a problem while installing PHP 5.2.3. ../configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql --disable-cgi Outputs the debug log attached, and I do not know how to solve this error. Regards, Omer Korner CONFIGURE: './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr/local/mysql' '--disable-cgi' CC: gcc CFLAGS: -I/usr/include -g -O2 CPPFLAGS: CXX: CXXFLAGS: INCLUDES:-I/usr/include/libxml2 -I/root/php-5.2.3/ext/date/lib -I/usr/local/mysql/include LDFLAGS:-L/usr/lib -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib LIBS: -lcrypt -lrt -lmysqlclient -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt DLIBS: SAPI: apache2handler PHP_RPATHS: /usr/local/mysql/lib uname -a: Linux IAM001 2.6.18-8.1.6.el5 #1 SMP Thu Jun 14 17:46:09 EDT 2007 i686 i686 i386 GNU/Linux gcc -o conftest -I/usr/include -g -O2 -L/usr/lib -Wl,-rpath,/usr/local/mysql/lib -L/usr/local/mysql/lib conftest.c -lcrypt -lrt -lmysqlclient -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt 1>&5 conftest.c: In function 'main': conftest.c:3: warning: incompatible implicit declaration of built-in function 'exit' ./conftest: error while loading shared libraries: /usr/local/mysql/lib/libmysqlclient.so.15: cannot restore segment prot after reloc: Permission denied
[PHP-INSTALL] Automatically adding #! to all PHP scripts
I have just finished installing Apache 2.2.4 and PHP 5.2.2 on a Solaris 10 machine. I've compiled PHP to run as a CLI to take advantage of Apache's suexec feature. Everything appears to work just fine but requires me to add in a #!/usr/local/php5/bin/php to all my PHP scripts in order to get them to execute properly. Is there a way to get this added into my PHP scripts automatically? A php.ini variable perhaps? Jesse Santana Project Lead - Enterprise Services Group Information Technology Services California State University, Long Beach 1250 Bellflower Blvd. Long Beach, CA 90840 Office: (562)985-8511 Fax: (562)985-8855
Re: [PHP-INSTALL] Automatically adding #! to all PHP scripts
Something like this may do it. *** from php.ini auto_prepend_file string Specifies the name of a file that is automatically parsed before the main file. The file is included as if it was called with the include() function, so include_path is used. The special value none disables auto-prepending. *** So if you add: #!/usr/local/php5/bin/php to a file called, say, cgi_start.php then set that in php.ini with: auto_prepend_file cgi_start.php According to the php docs, that should be included at the start of each file automatically. Never tried it, as I have no need for it at the moment. If you are running php as a CLI interpreter, you should check out the section in the manual on security, when you have time. IV. Security 22. Introduction 23. General considerations 24. Installed as CGI binary 25. Installed as an Apache module 26. Filesystem Security 27. Database Security 28. Error Reporting 29. Using Register Globals 30. User Submitted Data 31. Magic Quotes 32. Hiding PHP 33. Keeping Current Also, you might want to look at the Apache manual about using suexec as well. Kind Regards Keith Roberts On Tue, 3 Jul 2007, Jesse Santana wrote: To: php-install@lists.php.net From: Jesse Santana <[EMAIL PROTECTED]> Subject: [PHP-INSTALL] Automatically adding #! to all PHP scripts I have just finished installing Apache 2.2.4 and PHP 5.2.2 on a Solaris 10 machine. I've compiled PHP to run as a CLI to take advantage of Apache's suexec feature. Everything appears to work just fine but requires me to add in a #!/usr/local/php5/bin/php to all my PHP scripts in order to get them to execute properly. Is there a way to get this added into my PHP scripts automatically? A php.ini variable perhaps? Jesse Santana Project Lead - Enterprise Services Group Information Technology Services California State University, Long Beach 1250 Bellflower Blvd. Long Beach, CA 90840 Office: (562)985-8511 Fax: (562)985-8855 http://www.karsites.net http://www.raised-from-the-dead.org.uk This email address is challenge-response protected with http://www.tmda.net