Hello,
I have designed a website on my local windows Xp machine with IIS and php 5.
What are the proper steps for uploading these files into a webserver with FreeBSD.
The website I've created has a framework directory plus the PEAR and PHPLIB directory and makes use of them.
For each page in website, they have an independent folder and its all object oriented, dependent on the framework and the two libraries mentioned.
Everything was working fine on my Win xp machine, but when I uploaded the same files and folder to my webserver online which runs on FreeBSD I ran into tons of erros, and now I'm stuck and need help.
First thing which I know I had to change was the files path in the code, the INI_SET code I also changed it to the Linux version.
But now I'm stuck with this error on my webpage:
Fatal error: Call to undefined function: query() in /home/cdcasia/public_html/framework/class.DBI.php on line 66
can anyone tell me what this means...
For the sake of protability I installed Apache on my Local machine, since the Apache was the latest version, I also had to install PHP 5.2 to have the PHPApache2_2.dll file.
Then I did the same change to the code and ran it on Apache on my local machine and I get this error:
Fatal error: Call to undefined method DB_Error::query() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\IDIS\framework\class.DBI.php on line 66
on the online server it says, call to undefined function, but on my local machine it says call to undefined method?? how come?
Can anyone help me with this?
How come the same code works totaly fine on my IIS????
thanks in advance
Transfer of Code from PHP-Winxp to PHP-Freebsd
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
An undefined function error is when a function is called but PHP does not know what it is. This is common with include files. I'd check your include paths to make sure all you included files are working properly. You may also want to change the call to these includes from include to require_once. This is a stricter logic for PHP and results in errors when the file cannot be included.
how about an undefined method??
Well I've worked on that solution but it doesnt work and I got the same results.
one more thing, when I test a .php page with the phpinfo() function in it, I get two different results from the IIS server and the Apache server.
One funny thing is that the Apche server does not show the mysql secion???? why is that?
And one more thing, some of the php.ini settings are different, how can that be, such as in the Configuration
PHP Core, the first valu called allow_call_time_pass_reference is on in when I run the script from Apache and its off when I run it in IIS.
But when I check in my php.ini file which is in the c:\windows folder, it show that allow_call_time_pass_reference is off???
how can that be? how come some of the values are changed??? shouldnt they both be the same?? and where is the mysql section?
Well I've worked on that solution but it doesnt work and I got the same results.
one more thing, when I test a .php page with the phpinfo() function in it, I get two different results from the IIS server and the Apache server.
One funny thing is that the Apche server does not show the mysql secion???? why is that?
And one more thing, some of the php.ini settings are different, how can that be, such as in the Configuration
PHP Core, the first valu called allow_call_time_pass_reference is on in when I run the script from Apache and its off when I run it in IIS.
But when I check in my php.ini file which is in the c:\windows folder, it show that allow_call_time_pass_reference is off???
how can that be? how come some of the values are changed??? shouldnt they both be the same?? and where is the mysql section?
phpinfo() tells you which php.ini was used. And probably different php.inis have been used by php@iis and php@apache.
http://de2.php.net/ini explains where and when php is looking for its ini file.
http://de2.php.net/ini explains where and when php is looking for its ini file.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Two servers using two different php.ini files.Mohammad wrote:one more thing, when I test a .php page with the phpinfo() function in it, I get two different results from the IIS server and the Apache server.
And one more thing, some of the php.ini settings are different, how can that be, such as in the Configuration
PHP Core, the first valu called allow_call_time_pass_reference is on in when I run the script from Apache and its off when I run it in IIS.
But when I check in my php.ini file which is in the c:\windows folder, it show that allow_call_time_pass_reference is off???
how can that be? how come some of the values are changed??? shouldnt they both be the same??
I would guess that the php.ini file used by apache more than likely does not have the mysql extension enabled.Mohammad wrote:One funny thing is that the Apche server does not show the mysql secion???? why is that?
and where is the mysql section?