Install Prob With Php/cgi/unix/apache... Any Help Is Appreciated...
I'm running php as a cgi on unix server with apache. I modified my httpd.conf file to have
AddType application/x-httpd-php .php
Action application/x-httpd-php /cgi-bin/php
ScriptAlias /cgi-bin/ "/disk2/opt/eai/visnetwork/cgi-bin/
in cgi-bin I have a link called php which points to the php executable which resides in /usr/freeware/bin/.
when I point to any php file I get this message:
Warning: Unexpected character in input: '' (ASCII=16) state=1 in /usr/freeware/bin/php on line 217
Warning: Unexpected character in input: '' (ASCII=8) state=1 in /usr/freeware/bin/php on line 217
Warning: Unexpected character in input: '' (ASCII=20) state=1 in /usr/freeware/bin/php on line 217
Warning: Unexpected character in input: ' in /usr/freeware/bin/php on line 217
Warning: Unexpected character in input: ' in /usr/freeware/bin/php on line 217
Warning: Unexpected character in input: ' in /usr/freeware/bin/php on line 217
Parse error: parse error in /usr/freeware/bin/php on line 217
I think what is happening is that php is loading itself into the executable instead of the file that I'm linking to. I have verified this by running php on itself from the command line and I get the exact same error. I have a feeling I am overlooking some simple little detail. Can anyone help me out? I've been searching for days now and got a hot tip about this website.
View Complete Forum Thread with Replies
Related Forum Messages:
Unix And Apache Questions
I have a laptop that I want to turn into a miniature server. Why? I want to learn the ins and outs of webserver administration/installation and the such. This machine runs windows currently, but I want to run unix on it instead. I am guessing I have to install linux on it. Does anyone have any advice for me? Especially such as where do i get linux from? I don't want to run redhat like some of my friends say I should, I want a command line interface, No GUI. As for Apache - I am assuming that Apache is a program that I run on Linux? And that would make it a webserver?
View Replies !
Feedback Would Be Much Appreciated
I have just finished what I call Site Management System v0.0.0.0.0.0.0.0.0.1 :D I am not a professional programmer nor a really experienced one either (I've been dabbling with stuff for the last 10 years), so I would like you, the experts, to have a look at the code and provide me with your feedback. I do not know if I implemented good security practices or not and if I have made the functions efficient enough. Basically what this is, is a system to easily update a website. It stores everything in a database and makes it easy to to add/update/remove links. I guess you can call it a CMS, but I do not know if that would be an accurate description or not. There are 2 bugs that I know of: 1. When editing existing links, some white spaces appear out of nowhere. They are not in the database and when outside of the administration area, look correct. 2. I have a function that reorders the pagid's when one of the middle links is deleted, so that pageid's stay in sequence. It works flawlessly, but the links are not displayed in sequence on the page. To access the administration area, the username is administrator and the password is administrator. I have made things very simple to make the sure the basic functionality is working and that the initial design is sound. Once that is established, I have many ideas of things to add. This also means that the site looks really UGLY:) I will work on the css tags and the css sheet after the backend is safe and sound. You can access the site at http://linux-place.com, and can access all of the project files at http://linux-place/sitefiles (all except for the include file for the database password ;)
View Replies !
PHP Install With Apache
I tried to install PHP 4.0.0 and then PHP-3.0.16 but failed both the times. I am working on i386/ Caldera Linux 2.2.14 My apache server (1.3.11) is working alright. I tried both the rpm and gz install packages. Here's what I did: # gunzip -c php-4.0.x.tar.gz | tar xf - # cd php-4.0.x #./configure --with-mysql-with-xml--with-apache=../apache-1.3.11--enable-track-vars how to install php4.0 or 3.0 to work with Apache and MySql?
View Replies !
Cannot Install Apache
I downloaded and installed apache_2.0.54-win32-x86-no_ssl.msi By running binApache -k install I receive th following message: <OS 10048>Normalerweise darf jede Socketadresse <Protokoll, Netzwerkadresse oder Anschluss> nur jeweils einmal verwendet werden. : make_sock could not bind to no listening sockets available, shutting down Unable to open logs
View Replies !
Install Apache
I have Apache HTTP Server 2.0.53 and PHP 4.3.10 programs and I want to install it on my computer so I can view .php pages offline (I don't have ADSL)? I tried myself but it doesn't work. Manual is complicated.
View Replies !
Apache Install
im using windows xp and im tryng to install apache/php/mysql when i installed apache i got this error: no installed service "apache2" What does this mean? i tried to look at the service but i dont see anything apache2?? This occured when i tried to start the apache. MY installation was very sucessfull and also what does this error means cannot make socket on 0.0.0.0 And forgive me for being so dumb in this apache /php after i installed the apache what are the things that i need to configure in httpd.conf to work in php?
View Replies !
Install Apache,MySQL And PHP
I may sound like a newbie, but I've started my new job and we are running on Windows XP where previously I was using LINUX , and now I want to install Apache,MySQL and PHP, not done this for a while. Been to php.net but confused as to which one to download, any helpers? Also where to install the other stuff.
View Replies !
Install Problem Apache Php
I have been struggling in my spare time configuring apache and php. I am running windows xp pro O/S. Here is the problem, if i install apache choosing the option "For all users on port 80 as a service, recommended", all works fine i can create php files and run them in my browsers but i have to be online, it won't work offline (I understand port 80 is the web, can i change it and how if yes?). Now if i install apache with the second option "only for the current user on port 8080, when started manually." in order to be doing what i really want which is to test my code offline on my PC, nothing will work.I get the console and don't know what to do with it.I am supposed to start apache manually but how?
View Replies !
Apache 2.2.3 PHP 4.4.5 Install Fails
I have Apache 2.2.3 installed and running on WinXP Pro SP2. I installed PHP 4.4.5 and added the following lines in httpd.conf PHPIniDir C:/PHP445/ LoadModule php4_module C:/PHP445/php4apache2.dll When I restarted Apache, i got this error: The Apache service reported the following error: Quote:
View Replies !
Apache Php Cgi Install Problem
I am trying to install PHP 5.0.4 on Apache 2.0.54 on WinXP Pro SP2 as a cgi binary. Apache2 directory is c:/Apache2 htdocs is c:/Apache2/htdocs php is installed in c:/php This contains php.ini, php-cgi.exe and php5ts.dll and other files required for the module method of php installation are also present, but i think additional files being present should not cause any problem Directory containing php scripts is C:/Apache2/htdocs/php My httpd.conf file has #---------------------------------------------------------- ScriptAlias /php/ "C:/Apache2/htdocs/php/" AddType application/x-httpd-php .php Action application/x-httpd-php "C:/php/php-cgi.exe" #ScriptAliasMatch ^/php(.*) C:/Apache2/htdocs/php$1 #---------------------------------------------------------- I get the error [Wed Feb 22 15:01:18 2006] [error] [client 127.0.0.1] C:/Apache2/htdocs/php/index.php is not executable; ensure interpreted scripts have "#!" first line [Wed Feb 22 15:01:18 2006] [error] [client 127.0.0.1] (9)Bad file descriptor: don't know how to spawn child process: C:/Apache2/htdocs/php/index.php in the Apache error log. What could be the error? I have no experience in CGI - I only know it stands for Common Gateway Interface - is there something needed to be read up first? I assume when run in CGI mode, whatever you put in your "cgi" diectory (here it is c:/Apache2/htdocs/php) it will be treated as a script. Because if I try http://localhost/php/file.htm it still gives the same error. Also, if I put #! on the first line I get [Wed Feb 22 15:33:45 2006] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't create child process: 720002: index.php [Wed Feb 22 15:33:45 2006] [error] [client 127.0.0.1] (OS 2)The system cannot find the file specified. : couldn't spawn child process: C:/Apache2/htdocs/php/index.php or [Wed Feb 22 15:36:18 2006] [error] [client 127.0.0.1] (OS 193)%1 is not a valid Win32 application. : couldn't create child process: 720193: index.php [Wed Feb 22 15:36:18 2006] [error] [client 127.0.0.1] (OS 193)%1 is not a valid Win32 application. : couldn't spawn child process: C:/Apache2/htdocs/php/index.php Any suggested readings? I've googled the web and Google Groups but not able to get anything newer than what i know so far.
View Replies !
PHP Install On APACHE A Failure
I've been trying all day to configure PHP with Apache and it's been a nightmare I've tried every suggestion that is out there, including PHP's official manuals, and it's been nothing, but a failure. Code:
View Replies !
Install PHP5, Apache 2.2 And IIS
The book that I have talks you through the setup of both Apache and PHP. I allready have IIS installed. when I go to localhost:8080 I get an unable to find page come up. I have checked the error log and I get the following; [Wed Jan 31 13:28:58 2007] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/favicon.ico I have checked for the file on my system and it is indeed not there. But surely not having a favicon is not a reason to shut it down?? If so I have downoloaded the latest full packages today, so seems a little strange that it is missing.
View Replies !
Apache Install Error
Just downloaded apache 2.o and it wont run. The error I keep gettin is "DocumentRoot not a directory" I downloaded it as was told so not sure wat the problem is. It's probably something really easy.
View Replies !
Win98 Apache And Php Install Not Wokring.
I have installed the latest Apache and PHP binaries (the PHP CGI executable release - not the ISAPI). I then configured the httpd.conf sciprt using the install.txt file from the PHP install and 2 reference books as guides. This got me to the point where I BELIEVE the PHP interpretor is kicking in for .php scripts. But when I try and browse the following page : <? php_info() ?> I get the following error : Fatal error: Call to undefined function: php_info() in e:/apache/htdocs/phptest.php on line 1 Code:
View Replies !
Install PHP5 And Apache 2.2.2 (Linux)
I'm running into the same problem that no doubt many are. I'm installing PHP 5.1.4 and Apache 2.2.2 on the same server, but Apache won't recognize the PHP module, saying it's garbled. I understand from reading various bug reports that PHP will release this option come 5.2.0, but I want to know if anybody has PHP 5.1.4 and Apache 2.2.2 working under Linux yet.
View Replies !
Install Php4 And Php5 At The Same Time To Apache
Here is some note about installation together php4 and php5 on apache2. First you need is to edit with the help of hex editor php4apache2.dll (in my case, or php5apache2.dll) in php4 directory. You find "x-httpd-php" and replace with "x-httpd-plc" e.g. (I found 2 matches) Save your dll file and edit your apache config (httpd.conf) e.g. like: Code:
View Replies !
Install Php5 On A SuSE 9.3 Linux System Running Apache 2.0.49
I am trying to install php5 on a SuSE 9.3 Linux system running apache 2.0.49. For some reason,when attempting to restart the server,I get the following error: "Syntax error on line 26 of /etc/apache2/sysconfig.d/loadmodule.conf: Cannot load /usr/lib64/apache2-prefork/libphp5.so into server: /usr/lib64/apache2-prefork/libphp5.so: undefined symbol: php_session_create_id" Does anyone know what is causing this error,or what I can do to correct it?
View Replies !
Can't Install PHP - Keep Getting "Invalid Directory" Error Regarding The Path To Apache Httpd.h
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying to install PHP 5.1.4. I can not get the ./configure command to work. I keep getting this error: configure: error: Invalid Apache directory - unable to find httpd.h under /usr/local/apache/include So then I run this command: find / -name httpd.h which should find every file on my machine with the name "httpd.h". These are the results I get: /usr/local/apache/include/httpd.h /home/shelley/apache_1.3.36/src/include/httpd.h So I've rerun the ./configure command, using this first: --with-apache=/usr/local/apche/include and since that didn't work: --with-apache=/home/shelley/apache_1.3.36/src/include/httpd.h but I get the "Invalid directory" error with both addresses.
View Replies !
Can I Install Apache/MYSQL Side By Side With IIS?
However I also have a few sites I maintain that are Nix/PHP/MySQL. I would like to install PHP and MySQL on my windows machine. It would be ok if the PHP pages worked in the IIS environment such as http://localhost/index.php However I thinka better solution may be to install apache/php/mysql/phpmyadmin side by side with IIS. Would I be able to run it side by side with my IIS To get to IIS : http://localhost/index.asp To get to Apache: http://localapache/index.php I suppose I would like to use .htaccess locally to test mod_rewrites.
View Replies !
Reg. Prob
Now here is my registration script,for some reason it only registers the nick and pass. I forgot to add the queries. But the ones i use dont work. Can someone sort of re-edit or redo this script for me ? whatever query i use makes the page go blank or do nothing. Code:
View Replies !
Imap_header Prob
I'm trying to read only new mail from a mailbox and display it in a table. What I'm doing is this (server data obfuscated): $mail=imap_open('{SERVER}', 'ACC', 'PW'); if($mail){ $headers=imap_headers($mail); // Get number of mail $current=imap_num_msg($mail); // Get content of mails retrieved, formated and presented $header=imap_header($mail,$current); for($i = 1; $i <= $current; $i++){ ********$header=imap_header($mail,$i); ********$recent=$header->Recent; ********$unseen=$header->Unseen; ********if($recent*==*"N"*||*$unseen*==*"U"){ **process*mail*in*various*ways **[snipped] * As I understand it (php.net on imap_headers) the if($recent == etc) method is the way to get only new mail and ignore the rest. But I still get all mail every time I open the mailbox. Am I doing something wrong or is our slightly non-standard mail server misbehaving?
View Replies !
Php Whois Prob
I borrowed this code from php.net but my problem is that this is working fine on the command line (php.exe -q whois.php) but when accessed through the browser i get an error message -- bad file descriptor(9) PHP Code:
View Replies !
Prob With Gdlib
May i know wats the prob with this function? The program is: <?php var_dump(gd_info()); ?> and the output is like this: Fatal error: Call to undefined function gd_info() in C:wampwwwimg gdinfo.php on line 2.... I m trying to improve the color and brightness of the images in admin panel dynamically.
View Replies !
PHP And MySQL Prob....
I've installed Apache 1.3.12 With PHP 3 built in. After i've installed MySQL 3.22.32 an this way the PHP3 insn't compile with MySQL (I have Freebsd and I install those thing as binaries). What I want to kown is if there's a way to link PHP3 to MySQL without compling PHP3 (like ./configure --with-mysql=/...) Some person told me to edit the php3.ini but I don't know what to do here ?
View Replies !
Pear Prob
I am having a small problem using Pear. I am trying to install a web application which uses pear, unfortunately I am getting some errors. You can visit the page here to see the error: My phpInfo(); results can be viewed here: I am using a Linux VPS server which I access remotely.[color=blue] >From the root of the server pear is located at:[/color] /usr/share/pear Similarly, from the root of the server my site is hosted at: /
View Replies !
Implode Prob
i'm using implode to insert checkbox data as an array into database.. the input in the database is like this: Code:
View Replies !
Php String Prob
I have part of some code, and need it to match the exact answer given with the one in the database. If, for example, the answer is Levi Strauss, and I type in Bob Strauss, it's giving it as correct, because the database holds Levi Strauss, Levi, and Strauss as possible answers. I think the problem lies here: Quote: if($aquestion['sol1'] != "" && substr_count($saAns,$aquestion['sol1']) >= 1){ $check1 = 1; } if($aquestion['sol2'] != "" && substr_count($saAns,$aquestion['sol2']) >= 1){ $check2 = 1; } if($aquestion['sol3'] != "" && substr_count($saAns,$aquestion['sol3']) >= 1){ $check3 = 1; } if($aquestion['sol4'] != "" && substr_count($saAns,$aquestion['sol4']) >= 1){ $check4 = 1; } if($aquestion['sol5'] != "" && substr_count($saAns,$aquestion['sol5']) >= 1){ ..............
View Replies !
Simple Prob To Put A Zero On The End
I have a small bit of code that adds up prices - when it adds 2.50 and 2.50 the result is displayed as 2.5 - is there simple way of forcing it to put a zero on the end or would i have to convert it to a string (this is ok because it's just for display) and use some kind of replace function to see how many digits there were after the dot ??
View Replies !
Login Prob
i want to make secure pages and you need to log in. i can log in and secure one page. but the problem is. i include all my pages in to one page. and if i put in session_start in the start of my main page. i get this warning "Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/data/websites/kryotechftp/rma.kryotech.eu/www/index2.php:2) in /usr/data/websites/kryotechftp/rma.kryotech.eu/www/index2.php on line 4"
View Replies !
Order By Prob
I'm pulling catalog page numbers from a table, and trying to get them in the correct order. I have used the CAST() on my query before, but I don't think that will work in this case since these catalog page numbers start w/ a letter. So for example when I pull the As right now, it orders them as A-1, A-10, A-11, A-2, etc.
View Replies !
Rewrite Prob With Bb Mod
This is something i can't figure out. The url is like dload.php?action=category&cat_id=2 and i want it to be download-category-2.html The strange thing is that my other rewrites are working ok. This is in my page_header.php(left the other code out): Code:
View Replies !
Md5 Prob - Display Related
I have set up a basic user registration form on my site URL and all the info ins successfully transferred to the MySQL database. The problem is that after a user has submitted his info a confirmation page loads URL telling the user their username and password. The thing is it displays the md5, i.e. the encryted password. Is there an alternative to md5 that will also add an encytped password to the db or is there a reverse operation I can run on the md5? I have only been learning for the past few days so go easy. Below is the 'submitform.php' php code I use. PHP Code:
View Replies !
Php Email Headers Prob
I am working through "Beginning PHP5 Web Development", by WROX, and I am having trouble sending HTML email messages in one application. The email goes through, but is displayed only as text/plain not text/html. Here are the headers: Date: Wed, 25 Oct 2006 14:05:03 -0400 To: XXX@gmail.com Subject: Please Confirm your postcard MIME-Version: 1.0 Content-type: multipart/alternative; boundary="==MP_Bound_56gdfg56gd56gg==" From: no-reply@postcardorama.com X-vif-MailScanner-Information: Please contact the ISP for more information X-vif-MailScanner: Found to be clean X-vif-MailScanner-From: no-reply@postcardorama.com This is a Multipart Message in MIME format --==MP_Bound_56gdfg56gd56gg== Content-type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable <html><body>(html)Hello glennsend, Please click on the link below to confirm that you would like to send this postcard: <center><table width="500" border=0 cellpadding="4"><tr><td>Greetings, glenn rec!</td></tr> <tr><td>glennsend has sent you a postcard today.<br>Enjoy!<td></tr><tr><td align="center"><img src="http://localhost/mail/postcards/congrats.gif" border="o"></td></tr><tr><td align=center></td></tr><tr><td align=center>Enter your message here: </td></tr></table></center> <a href="http://localhost/mail/confirm.php?id=1b55d1414b145e3170f70e111336e437"> Click here to confirm</a></body></html> --==MP_Bound_56gdfg56gd56gg== Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit (text)Hello glennsend, Please visit the following URL to confirm your postcard: http://localhost/mail/confirm.php?i...0f70e111336e437 --==MP_Bound_56gdfg56gd56gg==-- And the relevant PHP code: $boundary = "==MP_Bound_56gdfg56gd56gg=="; $headers = "MIME-Version: 1.0 "; $headers .= "Content-type: multipart/alternative; boundary="$boundary" "; $message = "This is a Multipart Message in MIME format "; $message .= "--$boundary "; $message .= "Content-type: text/html; charset=iso-8859-1 "; $message .= "Content-Transfer-Encoding: quoted-printable "; $message .= $confirmmessage . " "; $message .= "--$boundary "; $message .= "Content-Type: text/plain; charset="iso-8859-1" "; $message .= "Content-Transfer-Encoding: 7bit "; $message .= $textconfirm . " "; $message .= "--$boundary--"; If someone can tell me why this does not appear as html,
View Replies !
Similar_text, Mysql Prob
I was wondering if anyone here had a decent solution to this mysql/php problem. I have a mysql database with a list of groups (group_id, group_name, group_location, group_time, group_day). group_name must be unique for each group_location - so there is only ever one particular group name per group location. I want to let users join a group or add a new group as they please. The user is provided with a form to fill out group_name, group_location, group_time, group_day and they post the form to a php page that checks what groups are in a particular location. I want to provide to the user information in this order: 1.)exact group_name match if there is one (showing the details of the group) 2.)the group information they provided in the posted form if there are no exact matches 3.)close group_name matches if there are some (showing the details of the group) This is an intuitively ordered list and makes it all the more user friendly. So after the user posts the form page to the checking page, I have a query that selects the group_id of the group_name they selected: $query_group = "SELECT group_name FROM groups WHERE group_id = '".$_POST['group_id']."'"; Then I do a while loop with $row = mysql_fetch_array($query_group) and have an if then else for various options: $row['group_name'] = $_POST['group_name'] $row['group_name'] = $_POST['group_name'] and for similar text: similar_text(strtoupper($group_name), strtoupper($row['group_name']), $similarity_pst); Where I show similar matching group_names if (number_format($similarity_pst, 0) > 90){ Of course this is all out of order if the first row is similar matching then it shows the similar match before a later exact match in the mysql table. How do I get a well-ordered output as indicated above? I don't want a lot of nested queries to achieve it (one query for exact, one query for LIKE and no match). Is there an elegant solution? Maybe dump out all groups for the specified group_location and push the matching score onto the array and sort?? Or maybe a temp table - no idea, never used that in mysql. I would also like to use the better string comparison power of similar_text or even levenshtein in php.
View Replies !
PHP + MYSQL PROB, SELECTING EVERY OTHER ROW
I have a MYSQL Db with 1 table called 'Coordinates', it contains 3 columns, 'id', 'lat', 'long'. I'm try to create SQL insert statements using the power of PHP, as my table has 92,000 rows in so far. I have written some functions, which will work out the four points around these 2 coordinates, but I need to add/call the values from 1 row with the following row. For example: Code:
View Replies !
Prob With In_array Search
What I am trying to achieve is to pull an array string from a database add a player to it then update the string in the database. Here is the code that I am using.The if statement does not work either it just adds the player over and over and does not find the player that has signed up twice. Code:
View Replies !
PHP File Upload Prob
I have my own dedicated Linux server and am trying to configure it to allow uploads larger than 512kb. Currently, anything larger goes to a 駬' page or hangs on a white screen - things that I am sure a lot of you are aware with using this function!? Anyways, I have updated the following in Linux... PHP.ini MAX_FILE_SIZE, MAX_POST_SIZE, and the various time outs, memory variables - all set to above and beyond what I will need. Code:
View Replies !
Mysql Query Prob
I want a mysql querry which show me result like Select * from Bb Where Pd = 飀' AND MsgFrom = 'umer@example.Com' AND TO = 'umer@example.com' When i add AND two times in query it show me erro, Anyone can help me out that how can i check that on BB where Pd is 104 and msgfrom is Umer@example.com and to field is equal to umer@example.com
View Replies !
Prob With '+' Preventing Insert
I've been having problems with inserts not happening and I've narrowed it down to the fact that one of the strings contains a '+' character and this is what seems to block the insert. the db field type is MEDIUMTEXT, so do i need to do something to the string or something to the field ? are there any other characters that may cause probs in a similar way ?
View Replies !
Prob With Date Format
I've got a line in a page that updates the "last-visit" field in the database the db field is a timestamp(14) type the query is this : "UPDATE `client` SET `client_visit`=NOW() WHERE client_id='$client_id'"; this is ok because it enters 20060503174158 in the db then i'm using this code to try to turn it back into a human readable date : date("d-m-Y", $datestamp) but the problem is that it just outputs ཏ-01-2038' so there's definitely something wrong but i can't see what i need to do to turn 20060503174158 into 03-05-2006.
View Replies !
File Upload Prob
I've done file uploads before and have solid code to get it done. But it isn't working on a new server I've been asked to work on. When you submit a file larger than 512 KB, it dies "Cannot find Server". Works great when the filesize is less than 512 and fine on other servers. Code:
View Replies !
Prob In PhpMyAdmin On IIS Installation On Windows XP
I have PHP installed on a Windows XP platform using IIS as server. When updating a MySQL database field set to MEDIUMTEXT in phpMyAdmin, the transaction seems to fail if the text contains more than a few hundred characters. The update is actually made successfully, but afterwards, the server cannot locate the phpMyAdmin page as requested by the client browser. I get a "Page cannot be found" error. Clicking on Update from the browser clears the problem. Anyone know what's causing the problem? Potential sources of the problem could be with the driver for MySQL, with the IIS settings, or with the phpMyAdmin settings. I suspect IIS.
View Replies !
|