Help with Configuring PHP
Moderator: General Moderators
Help with Configuring PHP
I have installed PHP5 on the new server. Copied over all the website files from the old server(that was using PHP4.something). The php "first layer" of php files work, I just had to rename then from php4 to php. But a few layers down they do not work. I renamed them .php and it acts like the file does not exist with I do
post = filename.php
But if I link it directly I see tyhe contents of the php and html code gets parsed. The first layer of php files are all php and I echo the html code. Seeing as I cannot have html code and php code in the same file. I could not find a .htaccess file, but I am running IIS so I think IIS sets that stuff up.
post = filename.php
But if I link it directly I see tyhe contents of the php and html code gets parsed. The first layer of php files are all php and I echo the html code. Seeing as I cannot have html code and php code in the same file. I could not find a .htaccess file, but I am running IIS so I think IIS sets that stuff up.
Progam Files?
I was going through the link on how to setup PHP with IIS. The only link that works on the sticky post about it. And setting up the PHP ISAPI extensin and it does not like my path c:\Progam Files\PHP
Im afraid thats because Program Files are two words, but thats how the windows installer set it up. So I have to move the files into C:\PHP and change everything the installer setup great.
Im afraid thats because Program Files are two words, but thats how the windows installer set it up. So I have to move the files into C:\PHP and change everything the installer setup great.
Yea
Can anyone help figure out why the PHP files are parsed when there's not HTML code in them, but when I have html code in them the HTML code is parsed and the PHP code is displayed. Any why does the windows installer that comes with php5 setup php in c:\program files when I have to turn around and move it, and re configure it so it will work.
A Manual Install
Yea I thought about it, but the readme file that comes with it is messed up. It says do this and this, then do this like it says to in the section labeled "whatever". I have to read that section then find my place back up in where I left off at. Needs to written in a more straight forward manner. Well I am reading through the link and it says someting installed PHP ISAPI or something. The only extension I have installed is php. It was installed from the setup routine. I dont even know the difference between a cgi or isap web server. I dont know which one I have. All I know is that i have IIS
the link says
The link says to add the PHP ISAPI extension. It has the same path as the .php extension that is already installed. I went to add the extension as it says in the link im looking at and it says to name it PHP ISAPI, but there's no place to name it. Just a place to put an extension.
Which extensions do I need?
I have these extensions listed
.asp
.cer
.cdx
.asa
.htr
.idc
.shtm
.shtml
.stm
.printer
.php
Which extensions do I need?
I have these extensions listed
.asp
.cer
.cdx
.asa
.htr
.idc
.shtm
.shtml
.stm
.printer
.php
seems right
feyd | Please use
And here's the output I get
All Nebraska WireCenters - Live Query
As of:
Total of All Copper Cable
"); if ($table == ".cable where type=32 and rb_state = 2") echo ("Total of Aerial Air Core Cable
"); if ($table == ".cable where type=30 and rb_state = 2") echo ("Total of Buried Air Core Cable
and so forth.
Is there something here that will not work with versin 5. Maybe i should just install version 4 again. Now that i have a clue as to how to manually install it.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
It seems setup right I can get a test php file that calls phpinfo() to work, I threw in some HTML code and it worked, but this file still does not work. Here part of the file contentsCode: Select all
<HTML>
<HEAD>
<TITLE>Nebraska WireCenters - Live Query</TITLE>
</HEAD>
<BODY BGCOLOR="#d5d2bb">
<CENTER><B>All Nebraska WireCenters - Live Query</B><br>
<br>As of:<br>
<?php
$db="(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = MTNELNKE110)(PORT = 1521))
(CONNECT_DATA = (SID = CADE))
)";
$connection = OCILogon("altdba","dba1",$db);
// Define Wire Centers
$wc1 = "ADAM";
$wc2 = "ALEX";
$wc3 = "ASHD";
$wc4 = "AUB";
$wc5 = "AVOC";
$stmt = OCIParse($connection, "select '$wc1' LOCATION, $query TOTAL from $wc1$table union
select '$wc2' LOCATION, $query TOTAL from $wc2$table union
select '$wc3' LOCATION, $query TOTAL from $wc3$table union
select '$wc4' LOCATION, $query TOTAL from $wc4$table union
select '$wc5' LOCATION, $query TOTAL from $wc5$table union
OCIExecute($stmt);
echo( date("l, F dS Y.") );
// Start of table and column headings (ID and Name)
print "<br><br>\n";
if ($table == ".cable where rb_state = 2")
echo ("<b>Total of All Copper Cable</b><br><br>");
if ($table == ".cable where type=32 and rb_state = 2")
echo ("<b>Total of Aerial Air Core Cable</b><br><br>");
if ($table == ".cable where type=30 and rb_state = 2")
echo ("<b>Total of Buried Air Core Cable</b><br><br>");All Nebraska WireCenters - Live Query
As of:
Total of All Copper Cable
"); if ($table == ".cable where type=32 and rb_state = 2") echo ("Total of Aerial Air Core Cable
"); if ($table == ".cable where type=30 and rb_state = 2") echo ("Total of Buried Air Core Cable
and so forth.
Is there something here that will not work with versin 5. Maybe i should just install version 4 again. Now that i have a clue as to how to manually install it.
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]Stupid question
These php files seem to go caput when its trying to connect to the Oracle DB. So I figure an Oracle client needs to be installed on that server for it to use the tsnames.ora file and the other Oracle things needed to connect. Just an idea.
adding oracle extensions
I think I have found the problem, Posted it in the database forum, but no one seems to answer there about it.
I do not have the oracle extensions installed. I copied oci.dll from the oracle directory
put it into the php folder, renamed it php_oci.dll
put thit line in the php.ini file
extension=php_oci.dll;
I did not see anywhere else in the file where extensions were installed but I saw a part and talked about it so I put it right under that(making that it would not be commented out)
I also restarted IIS.
still nothing.
So I downloaded the files and im going to try and see if it works now.
nope still not working
I do not have the oracle extensions installed. I copied oci.dll from the oracle directory
put it into the php folder, renamed it php_oci.dll
put thit line in the php.ini file
extension=php_oci.dll;
I did not see anywhere else in the file where extensions were installed but I saw a part and talked about it so I put it right under that(making that it would not be commented out)
I also restarted IIS.
still nothing.
So I downloaded the files and im going to try and see if it works now.
nope still not working
well
I setup PHP4.0 and im getting errors msgs now(better than no msgs). whether I use the orant folder that I copied from the old server, the ora102(oracle 10.2 client library that I downloaded) ot the ora92(oracle 9.2 I installed) I get the same error msgs.
ora-12222 and once time I got ora-12505. I dont know what the listener.ora file is, but I looked at it on the old server and there's no mention in it about the SID that the older server used to connect to.
ora-12222 and once time I got ora-12505. I dont know what the listener.ora file is, but I looked at it on the old server and there's no mention in it about the SID that the older server used to connect to.
Updates
I have 5.2.4 working and php -v works with no errors this time. My php file says that the connect to oracle is no good. I used a if statement to check that. I have a oci8 spot in the phpinfo() function and here it is
OCI8 Support enabled
Version 1.2.4
Revision $Revision: 1.269.2.16.2.38 $
Active Persistent Connections 0
Active Connections 0
Temporary Lob support enabled
Collections support enabled
Directive Local Value Master Value
oci8.default_prefetch 10 10
oci8.max_persistent -1 -1
oci8.old_oci_close_semantics 0 0
oci8.persistent_timeout -1 -1
oci8.ping_interval 60 60
oci8.privileged_connect Off Off
oci8.statement_cache_size 20 20
I have also included a ODBC because I believe that this is the problem, I do not have a Oracle ODBC Driver installed and so soon as I figure out how to install one I will.
odbc
ODBC Support enabled
Active Persistent Links 0
Active Links 0
ODBC library Win32
Directive Local Value Master Value
odbc.allow_persistent On On
odbc.check_persistent On On
odbc.default_db no value no value
odbc.default_pw no value no value
odbc.default_user no value no value
odbc.defaultbinmode return as is return as is
odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes
odbc.max_links Unlimited Unlimited
odbc.max_persistent Unlimited Unlimited
OCI8 Support enabled
Version 1.2.4
Revision $Revision: 1.269.2.16.2.38 $
Active Persistent Connections 0
Active Connections 0
Temporary Lob support enabled
Collections support enabled
Directive Local Value Master Value
oci8.default_prefetch 10 10
oci8.max_persistent -1 -1
oci8.old_oci_close_semantics 0 0
oci8.persistent_timeout -1 -1
oci8.ping_interval 60 60
oci8.privileged_connect Off Off
oci8.statement_cache_size 20 20
I have also included a ODBC because I believe that this is the problem, I do not have a Oracle ODBC Driver installed and so soon as I figure out how to install one I will.
odbc
ODBC Support enabled
Active Persistent Links 0
Active Links 0
ODBC library Win32
Directive Local Value Master Value
odbc.allow_persistent On On
odbc.check_persistent On On
odbc.default_db no value no value
odbc.default_pw no value no value
odbc.default_user no value no value
odbc.defaultbinmode return as is return as is
odbc.defaultlrl return up to 4096 bytes return up to 4096 bytes
odbc.max_links Unlimited Unlimited
odbc.max_persistent Unlimited Unlimited
fixed
I have to change the SID(someone had to tell me what it was) and When using method = post and action = filename in php 4 I guess it was just passed as the variable name with a $ placed in front of it. I had to do this at the beginning of each php file.
$table = $_POST["table"]; and so forth.
$table = $_POST["table"]; and so forth.