RE: [PHP] Apache 2.0.52 / PHP 4.3.10 Integration Question...
What exactly does your script end in? I think you can make up your own extension and add it as well just tell apache what to use when it sees it. I.E. AddType application/x-httpd-php .fred I can't guarantee that's true but I think you can. > -Original Message- > From: Robin Getz [mailto:[EMAIL PROTECTED] > Sent: Friday, December 31, 2004 12:55 PM > To: [EMAIL PROTECTED] > Cc: php-general@lists.php.net > Subject: RE: [PHP] Apache 2.0.52 / PHP 4.3.10 Integration Question... > > Andrew Kreps wrote: > > >I had to add this line to my httpd.conf: > > > >AddType application/x-httpd-php .php > > I have this and the DirectoryIndex - the problem is that my script does > not > end in a .php extention. (GForge ) > > If I rename the file projects.php and point to that, it works, but that > means an entire re-write of the existing GForge. > > I guess the question is - how to make a file that does not end in .php or > have any extension, be understood as a php file? > > Thanks > -Robin > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Quick compile question --with-oci8
That's a valid question. I am not a dba. In fact I'm not even a real designer. I'm only a hack technician who got tired of arguing with the IT department one day and decided to make my own tools to use. I chose php based off the community of php. I tried a couple other languages and a few scripting languages. Every attempt to ask for help came with the high price of getting flamed. In Google groups you can see such an encounter by searching on "grep once awk twice or more". I load about 3 tables from a database called the LERG. It's updated daily. I currently manually load these tables into my scratch database. I don't have to worry about cycles because my app runs on the server in our department which IT does not have access to. So we can query that database all day. Finally the DataWarehouse team gave us access to update our local database via read-only. So I am not abandoning the mysql database just updating it from live data. Would you have a link to the client downloads at OTN? I have been downloading the wrong things apparently. Thanks, bd > -Original Message- > From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 30, 2004 3:08 PM > To: Brian Duke > Subject: Re: [PHP] Quick compile question --with-oci8 > > Brian Duke wrote: > > >Correct me if I'm wrong but we will have to install oracle8 || 9i before > we > >can compile php --with-oci8. I don't really want to run oracle. Our local > >server only needs to use the oci8 functions to log into the datawarehouse > >and update our local mysql database but after a week of frustration I > think > >that's what we have to do. > > > > > Just out of curiosity, wy would you need Oracle if your database is > MySQL? PHP comes with MySQL libraries built-in, or you can choose to > install MySQL libraries from www.mysql.com and compile PHP with them. > > -- > W | I haven't lost my mind; it's backed up on tape somewhere. > + > Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130 > IT Director / SysAdmin / Websmith . 800.441.3873 x130 > Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave. #6 > http://www.pcraft.com . . .. Boulder, CO 80303, U.S.A. > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Quick compile question --with-oci8
Thanks John, Can you (or someone on the list) direct me to the oracle site where I can download the client files? The only client files I saw were for the 10g instantclient. Our current build says the libraries need don't exist with that one. > -Original Message- > From: John Nichel [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 30, 2004 6:19 PM > To: php-general@lists.php.net > Subject: Re: [PHP] Quick compile question --with-oci8 > > Brian Duke wrote: > > This has been going on for about a week now. I have an oracle client > > installed. I have php4 source installed all on a stripped down fedora > > server. We get various errors. Like the infamous ld can find XXX in > > -lclntsh. > > > > Correct me if I'm wrong but we will have to install oracle8 || 9i before > we > > can compile php --with-oci8. I don't really want to run oracle. Our > local > > server only needs to use the oci8 functions to log into the > datawarehouse > > and update our local mysql database but after a week of frustration I > think > > that's what we have to do. > > > > Thanks all. > > You only need the client libraries, not the db itself. If you have the > Oracle CD's, the libraries will be on there (you can also download this > from Oracle). > > -- > By-Tor.com > ...it's all about the Rush > http://www.by-tor.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Quick compile question --with-oci8
This has been going on for about a week now. I have an oracle client installed. I have php4 source installed all on a stripped down fedora server. We get various errors. Like the infamous ld can find XXX in -lclntsh. Correct me if I'm wrong but we will have to install oracle8 || 9i before we can compile php --with-oci8. I don't really want to run oracle. Our local server only needs to use the oci8 functions to log into the datawarehouse and update our local mysql database but after a week of frustration I think that's what we have to do. Thanks all. PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I think this is a bug...cant use exec commands.
Thank you all for your collective help. I was very frustrated. This list helped me find the answer quickly and once again PHP is slowly all beginning to make sense. The default values enable safe-mode and that is what Jason was trying to get me to check. Thus when the php.ini wasn't where php thought it was then the engine just used the default values. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I think this is a bug...cant use exec commands.
> They're different, see manual for details. The Manual is brilliant. > exec("free -b", $data ,$result_code); > print_r($data); > > Array > ( > [0] => total used free sharedbuffers > cached > [1] => Mem: 256917504 2494013447516160 0 29487104 > 80941056 > [2] => -/+ buffers/cache: 138973184 117944320 > [3] => Swap:271392768 150523904 120868864 > ) But an example is worth 5000 pages of a manual. That's 2 I owe you Jason. Thank you Sir. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I think this is a bug...cant use exec commands.
Forgive the top-post. I tried the php -I found php was looking for the php.ini in /var/www/conf. I copied php.ini from /etc/ to /var/www/conf. Now the shell_exec works fine. Thanks Jason. If I wanted to use exec() for this project in the future, is: (shell_exec ("free -b")) = (exec("free -b", $data ,$result_code)) I tried using exec as exec("free -b", $data ,$result_code)); but I didn't get the $data I was expecting. Are my variables mixed up? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I think this is a bug...cant use exec commands.
Yes, in fact to be sure I copied free into my /var/www/html/swap directory and used that path. It still says. [EMAIL PROTECTED] swap]# php swap.php sh: line 1: /usr/local/php/bin/free: No such file or directory even though I explicitly said exec ("/var/www/html/swap/free -b", $data, $result); -Original Message- From: Daevid Vincent [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 12:51 AM To: 'Brian Duke'; 'Jay Blanchard'; 'William Lovaton'; [EMAIL PROTECTED] Subject: RE: [PHP] I think this is a bug...cant use exec commands. This may seem obvious, but did you try the FULL path to 'free'? As in exec("/usr/local/bin/free -b", $data, $result); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I think this is a bug...cant use exec commands.
Oops I catted the wrong file. But the file is exactly the same as mem.php. [EMAIL PROTECTED] swap]# cat mem.php -Original Message- From: Brian Duke [mailto:[EMAIL PROTECTED] Sent: Friday, April 02, 2004 12:21 AM To: 'Jason Wong'; [EMAIL PROTECTED] Subject: RE: [PHP] I think this is a bug...cant use exec commands. Ok here is my php.ini. directly from /etc/php.ini ; Safe Mode ; safe_mode = Off ; By default, Safe Mode does a UID compare check when ; opening files. If you want to relax this to a GID compare, ; then turn on safe_mode_gid. safe_mode_gid = Off ; When safe_mode is on, UID/GID checks are bypassed when ; including files from this directory and its subdirectories. ; (directory must also be in include_path or full path must ; be used when including) safe_mode_include_dir = ; When safe_mode is on, only executables located in the safe_mode_exec_dir ; will be allowed to be executed via the exec family of functions. safe_mode_exec_dir = /var/www/html/swap/ I am on a redhat 9.0 machine so I use the locate command after a fresh updatedb andf this is all the ini files I was talking about. [EMAIL PROTECTED] swap]# updatedb [EMAIL PROTECTED] swap]# locate php.ini /etc/php.ini /etc/php.ini.rpmsave /root/php-4.3.4/php.ini-recommended /root/php.ini.rpmsave /home/bduke/downloads/php/php-4.3.5/pear/tests/php.ini.tst /home/bduke/downloads/php/php-4.3.5/php.ini-recommended /home/bduke/downloads/php/php-4.3.5/php.ini-dist The php-4.3.5 in not installed yet. I just downloaded it and untarred the contents in my download directory. We run the program via the web it's for MRTG graphs. I was using an example I found on the web. Here is the result when I change line 1 using exec() [EMAIL PROTECTED] swap]# cat swap.php [EMAIL PROTECTED] swap]# php mem.php sh: line 1: /usr/local/php/bin/free: No such file or directory [EMAIL PROTECTED] swap]# pwd /var/www/html/swap [EMAIL PROTECTED] swap]# ls ./free ./free [EMAIL PROTECTED] swap]# The MRTG will call the program via a cgi script. It calls this program only when the data is requested that way we save on cycle time. -Original Message- From: Jason Wong What are these other ini files you've looked at? How are you executing this script? Via a webserver or directly using the php executable? If the former use phpinfo() to find out where php thinks it's php.ini should be found, if the latter use "php -i". Once you've determined where your php.ini should be examine its safe_mode settings. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I think this is a bug...cant use exec commands.
Ok here is my php.ini. directly from /etc/php.ini ; Safe Mode ; safe_mode = Off ; By default, Safe Mode does a UID compare check when ; opening files. If you want to relax this to a GID compare, ; then turn on safe_mode_gid. safe_mode_gid = Off ; When safe_mode is on, UID/GID checks are bypassed when ; including files from this directory and its subdirectories. ; (directory must also be in include_path or full path must ; be used when including) safe_mode_include_dir = ; When safe_mode is on, only executables located in the safe_mode_exec_dir ; will be allowed to be executed via the exec family of functions. safe_mode_exec_dir = /var/www/html/swap/ I am on a redhat 9.0 machine so I use the locate command after a fresh updatedb andf this is all the ini files I was talking about. [EMAIL PROTECTED] swap]# updatedb [EMAIL PROTECTED] swap]# locate php.ini /etc/php.ini /etc/php.ini.rpmsave /root/php-4.3.4/php.ini-recommended /root/php.ini.rpmsave /home/bduke/downloads/php/php-4.3.5/pear/tests/php.ini.tst /home/bduke/downloads/php/php-4.3.5/php.ini-recommended /home/bduke/downloads/php/php-4.3.5/php.ini-dist The php-4.3.5 in not installed yet. I just downloaded it and untarred the contents in my download directory. We run the program via the web it's for MRTG graphs. I was using an example I found on the web. Here is the result when I change line 1 using exec() [EMAIL PROTECTED] swap]# cat swap.php [EMAIL PROTECTED] swap]# php mem.php sh: line 1: /usr/local/php/bin/free: No such file or directory [EMAIL PROTECTED] swap]# pwd /var/www/html/swap [EMAIL PROTECTED] swap]# ls ./free ./free [EMAIL PROTECTED] swap]# The MRTG will call the program via a cgi script. It calls this program only when the data is requested that way we save on cycle time. -Original Message- From: Jason Wong What are these other ini files you've looked at? How are you executing this script? Via a webserver or directly using the php executable? If the former use phpinfo() to find out where php thinks it's php.ini should be found, if the latter use "php -i". Once you've determined where your php.ini should be examine its safe_mode settings. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] I think this is a bug...cant use exec commands.
I tell you the truth. I have only 1 php.ini. There are other ini files I have looked at but I have not found anything in them about safe mode. Everything has been double or triple checked. Still not able run any shell_exec commands from the command line. I need the output from free so if I use exec() Exec complains that "free" is not in /usr/local/php/bin/ directory. ( I think that's the directory but whatever it was, it wasn't pointing at the web directory where my script is.) Really someone should try this script. It's harmless. 'Free' is a nix command. And BTW [snip from original] > Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in > /var/www/html/swap/mem.php on line 3 [/snip] Is how that line should read. The complaint is about the script I an\m running called mem.php. Originally named swap.php. I wasn't paying close enough attention when I cut from the bugs.php.net page and pasted. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] I think this is a bug...cant use exec commands.
I can't seem to use the shell_exec() command. Here is the program: I can make this script executable via chmod 700 mem.php and run it directly via the command line. Only then I can get it to work on my redhat 9 machine. The problem is I call this script from another script to plot out the data on MRTG graphs. I expect to see something like : [EMAIL PROTECTED] php-4.3.2]# php /var/www/html/swap/mem.php 246789242 512689734 [EMAIL PROTECTED] php-4.3.2]# But in fact I get the warning : [EMAIL PROTECTED] php-4.3.2]# php /var/www/html/swap/mem.php Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in /var/www/html/swap/swap.php on line 3 [EMAIL PROTECTED] php-4.3.2]# The warning would be applicable if any php.ini file on my system had Safe Mode enabled. As the bug people said shell_exec() == ``. But that applies if anywhere on my box safemode was enabled. I have spent 4 solid days looking and verifying there is no safe mode enabled on my box. It's an internal monitoring server there is absolutely no need for safe mode. This is what is in my PHP.ini ; Safe Mode ; safe_mode = Off safe_mode_gid = Off Can someone tell me if they can run that script on their *nix machine? I'm running php 4.32 apache 2.0 server on a up-to-date redhat 9 server. I don't think this script can be run from another program.
[PHP] POST data
Can someone tell me how I can access data from a POST? I don't mean the variables because the data I'm getting doesn't have any. I have a client that is doing a simple HTTP Post to a server and appending xml data right after the header. I need access to the xml blob. Thanks, Brian - Brian (Be sure to remove the # symbol before replying to my email address) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: [PHP-INST] "VERY NEWBIE" php_* mod_* --with- question
Well, I'm not the best qualified to answer this question but here goes my best shot (Guru's watch me here make sure I don't screw this up). Starting with Apache. Apache does not actually process your *.php files. There is another engine that takes care of that called Zend. There are a couple lines you need to add to httpd.conf in order to tell apache what to do with these files but if you installed apache via RPM it should be pre-built with tags that has something like AddType application/x-httpd-php .php and LoadModule php4_modulelibexec/libphp4.so in there. now the AddType line may also have .php4 and .php3 as well as .php Make sure that the modules for your oracle-php are of the same release as your php. I.E. php-oracle-4.2.2-1j1.i686.rpm should have php-4.2.2-1j1.i686.rpm installed prior to the oracle-php. Not sure about the actual syntax of the LoadModule (modulename) libexec/oracle.so but I would include that in your load modules section in the httpd.conf. Check the Apache.org site and click on PHP. The www.php.net has an introductory tutorial link on the left of the page. Next click on "Installation" and that will give you a list of different types of servers you can configure for including Apache. I had a lot of trouble getting mine to work until I did a rpm -e php and saw about 10-15 versions of php in the system. php-oracle, php-postgres, php-mysql, php-devel ...etc. some of them (including the main php*.rpm) were of different revisions. I yanked all of them out and only installed what I needed and all of the same revision. Now my system is running much faster and cleaner and php is finally working too. -Original Message- From: Aleksandar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 02, 2002 2:06 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-INST] "VERY NEWBIE" php_* mod_* --with- question Hello List for the first time, I am very new to php but impressed from what i've seen so far. I managed to configure php w/ mysql and db2 do some selects, inserts ... What I am inerested in is what are all those mod_php* and php_* on the distribution's CDs e.g. if they are installed how do i get support for which i thought i have installed the module( like rpm -i php-oracle-4.2.2-1j1.i686.rpm means that i can somehow get oracle support without recompiling php ??? or no). Another thing that bothers me is should I (can I) use for example Oracle's apache or install "regular" apache and work with it. Is Apache-PHP-Linux on one machine and OracleDB-Win/Lin on another machine big trouble or peace of cake (It asks me for oci8 lib which I don't know where to get if I don't want to install any oracle products on the web server (can i get them from php-oci8...rpm for example) DSO e.g. oracle.so is a shared object but where to include it for the support and is it enough) Thank you all and looking forward to hearing from you -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: How can I uncompress zlib data in the browser?
Thanks! It seems to work when I put this at the very top of my php file: ob_start("ob_gzhandler"); When I do a tcpdump on port 80, I see a small amount of garbage with that statement and huge amount of text without it. The text displays correctly in my browser either way, so it looks like it works. - Brian >Yes. > >Read the manual about "output buffering". >Also read up on Apache's site about mod_gzip. >http://apache.org >Now, the 64 dollar question: > >Will the browser *CORRECTLY* identify and decompress the gzipped data? - Brian (Be sure to remove the # symbol before replying to my email address) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How can I uncompress zlib data in the browser?
Is it possible to use the zlib functions in php to compress data, send that data to the browser, then uncompress it? My clients will only be using IE so is there something in IE that will do it? Javascript? Thanks, Brian - Brian (Be sure to remove the # symbol before replying to my email address) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] best way to include html?
I'm setting up an html "shell" for my webpage that I include with my php code so I don't have to see html crap and whatnot. I'm wondering what the best way is to insert the html "shell" into my code? Should I just echo the file, should I include(), require(), include_once(), or require_once()?? One section of the shell, which is in a separate file, is an html form - would that change the way I include that particular section of html? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] array() stuff
I'm trying to create the following array: $host_info = array( "hostname" => "localhost" "log" => "rocketbox_db.log" "username" => $username "password" => $password "database" => "rocketbox" "table" => $table ); however when I try and access the document, I get the following error: Parse error: parse error, expecting `')'' in /usr/home/kidlinux/htdocs/rocketbox/admin/index.php on line 26 line 26 is \* "log" => "rocketbox_db.log" *\ in the array code I pasted above. This isn't very far into my script, and I'm sure I havn't missed anything like a ) in my code anywhere before that array() declaration. I've gone over my code several times. According to the documentation (or my interpretation of it) that array should be correct. One other thing I'm unsure of that doesn't seem to be covered in the documentation is referring to variables in an array, like \* "username" => $username *\ where $username is a variable submitted by an html form via the post method. Should that work?? And what about referring to a function in an array such as the following: $value = array( "date" => $date = strftime('%Y-%m-%d') "title" => $info_title "dept" => $info_dept "info" => $info ); Is that valid? Can i just do \* "date" => strftime('%Y-%m-%d') *\ ?? Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] date/time in wrong zone
It may also be relevant that the "T" format string for the date() function also reports GMT, even though I've set my system timezone to EDT. The command "date" in FreeBSD also reports the time in EDT. -Original Message- From: Duke <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: April 9, 2001 12:00 AM Subject: [PHP] date/time in wrong zone >I'm using php 4.0.4pl1on a FreeBSD system. >When I use a php date/time function, it reports the time in GMT, however, I >have the date on my FreeBSD system set to EDT. >I can't figure out what the problem is here. The only thing I can think of >is that when I compiled php, my system timezone was set to GMT and perhaps >the local timezone is hardcoded into php. That doesn't make much sense >though. I have changed my timezone to EDT since I compiled php. >Any suggestions? >Thanks. > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] >To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] date/time in wrong zone
I'm using php 4.0.4pl1on a FreeBSD system. When I use a php date/time function, it reports the time in GMT, however, I have the date on my FreeBSD system set to EDT. I can't figure out what the problem is here. The only thing I can think of is that when I compiled php, my system timezone was set to GMT and perhaps the local timezone is hardcoded into php. That doesn't make much sense though. I have changed my timezone to EDT since I compiled php. Any suggestions? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]