Jump to content

toovey

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

toovey's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [root@sls-cd1p1 www]# chown -R apache /var/www/seatline1 Same errors: [client 63.118.15.152] PHP Warning: mysql_connect(): Access denied for user 'apache'@'localhost' (using password: NO) in /var/www/seatline1/include/mysql.inc.php on line 29 [client 63.118.15.152] PHP Warning: mysql_list_tables(): Access denied for user 'apache'@'localhost' (using password: NO) in /var/www/seatline1/include/mysql.inc.php on line 31 [client 63.118.15.152] PHP Warning: mysql_list_tables(): A link to the server could not be established in /var/www/seatline1/include/mysql.inc.php on line 31 [client 63.118.15.152] PHP Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/seatline1/include/mysql.inc.php on line 41 [client 63.118.15.152] PHP Fatal error: Call to undefined function: find_environmental() in /var/www/seatline1/include/mysql.inc.php on line 310
  2. There in different subdirectories - posting them in the forum will be huge - its 8600 hundred lines here are the individual files: [root@sls-cd1p1 hotel]# ls -lah /var/www/seatline1/ |grep index.php -rw-r--r-- 1 root root 12K Feb 7 08:18 index.php here is connect.php [tt]-rw-r--r-- 1 root root 3.8K Feb 7 07:40 connect.php,/tt] and here is the include directory: [root@sls-cd1p1 seatline1]# ls -lah /var/www/seatline1/include total 180K drwxr-xr-x 2 root root 4.0K Feb 7 17:48 . drwxr-xr-x 24 root root 4.0K Feb 8 11:58 .. -rw-r--r-- 1 root root 2.3K Aug 13 20:37 calendar.inc.php -rw-r--r-- 1 root root 4.3K Apr 6 2006 common.js -rw-r--r-- 1 root root 951 Feb 6 22:49 config.inc.php -rw-r--r-- 1 root root 11K Apr 6 2006 creditcard.js -rw-r--r-- 1 root root 940 Apr 6 2006 CryToGraphy.php -rw-r--r-- 1 root root 26 Aug 6 2006 debug.php -rw-r--r-- 1 root root 12K Jul 30 2006 functions.php -rw-r--r-- 1 root root 207 Apr 6 2006 imageprocess.php -rw-r--r-- 1 root root 73 Apr 6 2006 index.php -rw-r--r-- 1 root root 1.8K Jul 6 2006 mailfunctions.php -rw-r--r-- 1 root root 12K Aug 6 2006 mysql.inc.php -rw-r--r-- 1 root root 1.6K Feb 6 19:22 new_connect.inc.php -rw-r--r-- 1 root root 2.6K Apr 6 2006 resize1.php -rw-r--r-- 1 root root 3.9K Apr 6 2006 resize.php -rw-r--r-- 1 root root 720 Apr 6 2006 safecode.php -rw-r--r-- 1 root root 613 Apr 6 2006 sendmail.php -rw-r--r-- 1 root root 4.0K Jun 6 2006 timedate.php
  3. Thanks for helping out the permissions are attached. ls -Rlah /var/www/seatline1/ > /root/permissions.txt [attachment deleted by admin]
  4. permissions are good - if the includes were failing though wouldnt you see that in the log files as warnings?
  5. forgot to add mysql.inc.php - will add as an attachment - its the one throwing all the errors.... [attachment deleted by admin]
  6. This is the start of my script: <? require("connect.php"); require("include/functions.php"); $today=gmdate("Y-m-d"); $squery="DELETE FROM ticket_bid WHERE expirydate < '$today'"; $sresult=mysql_query($squery); connect.php contains the following: <? session_start(); require ("include/config.inc.php"); //include_once ("include/functions.php"); include_once("include/CryToGraphy.php"); //="http://com22/tixstopsite/"; error_reporting(7); include "include/debug.php"; require ("include/new_connect.inc.php"); $db=mysql_connect($DBSERVER, $USERNAME, $PASSWORD); mysql_select_db($DATABASENAME,$db); mysql_query("delete from tickets where quantity < 1"); echo mysql_error(); include/config.inc.php contains the following: $DBSERVER = "127.0.0.1"; $DATABASENAME = "somedb"; $USERNAME = "root"; $PASSWORD = "password"; include/new_connect.inc.php <? function p_r($arr) { if (debug) {echo "<pre>"; print_r($arr); echo "</pre>";} } /* new connect*/ $config['dbname']=$DATABASENAME; $config['persistent']=0; $_host=$GLOBALS[_SERVER][HTTP_HOST]; p_r($_host); include("mysql.inc.php"); $dbh = new sql; $host_arr=array( 'localhost'=>array(connect=>array($DBSERVER, $USERNAME, $PASSWORD,$USERNAME), title=>'DEV') ); p_r($host_arr); $dbh -> connect('mysql', $host_arr[$_host][connect]); //p_r($dbh); exit; ?> My log is as follows: [client 63.118.15.152] PHP Warning: mysql_connect(): Access denied for user 'apache'@'localhost' (using password: NO) in /var/www/seatline1/include/mysql.inc.php on line 29 [client 63.118.15.152] PHP Warning: mysql_list_tables(): Access denied for user 'apache'@'localhost' (using password: NO) in /var/www/seatline1/include/mysql.inc.php on line 31 [client 63.118.15.152] PHP Warning: mysql_list_tables(): A link to the server could not be established in /var/www/seatline1/include/mysql.inc.php on line 31 [client 63.118.15.152] PHP Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /var/www/seatline1/include/mysql.inc.php on line 41 [client 63.118.15.152] PHP Fatal error: Call to undefined function: find_environmental() in /var/www/seatline1/include/mysql.inc.php on line 310
  7. So then is there a difference in the way linux handles this behavior as opposed to windows? This works fine on the win32 installation. I will post the code samples.
  8. jesirose sorry for msging you. I changed the includes to requires as per my original post. I have register globals turned off though on both servers. So can I still mark them as global? Brian
  9. Yea - I imported the mysql database from the win box to the linux box. I set the mysql authentication information in the config file containing it. The issue is that the php program is never including these values, as it tries with the account "apache" with no username, which I am assuming is the default.
  10. Im sorry but I dont follow. The mysql login information is included in a file that has those variables defined. Is there something I am missing?
  11. No register globals is turned off on the windows server.
  12. Hello board, I am porting an existing php web application from Windows to Linux. The application uses mysql, and does not appear to depend on any libraries. Between the two servers, there does not appear to be any major differences between php configuration paramaters. So the index.php file has some includes, and those files also have includes. One of them is the mysql username and password information. Another file contains a function. So when I call index.php, it gives warnings on failures to connect to mysql with the username of apache and no password (I am assuming this is the system default, so the include containing the username and pass isnt working.) Also there is a failure because it tries to call the function that I mentioned previously but it can't find it (says undefined function). In the PHP log file, there are no failures on the includes. I changed them to requires just to make sure. So assuming that the requires are working properly (safe to assume), then there must be something wrong with my variable scoping and / or function definition scoping??? Is there any significant difference between win32 and linux that I should know about? Is there any articles I can be pointed to? Thanks in advance for your reponses. Brian
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.