Koozali.org: home of the SME Server

Problem with php and mysql

manuelazo

Problem with php and mysql
« on: July 01, 2005, 04:48:26 PM »
Hi fellows!! I don't know what happens. I year ago I could "install" some php files on SME that use mysql, and they work great!! Right now, I'm trying to install a simple php. The problem is after I enter my user and password, with one php (http://freshmeat.net/projects/billing-software/) I get the same page with no errors at all, and with other php(http://hotscripts.com/search/4909189.html) I just get a blank page, an no errors.  :-(

This is what I do to install this scripts!!

- Create an ibay with php enabled, access to group write, read everybody
- Copy the files to the html folder

MYSQL
- # mysqladmin create invoice
- # mysql --user=root mysql
- mysql> grant all on invoice.* to invoice@localhost identified by 'factura';
- mysql> flush privileges;
- mysql> quit
- # mysql invoice < clients.sql
- # mysql invoice < invoices.sql
- # mysqlshow invoice

- I modigy config.php to suit the settings (database: invoice, user:invoice, password:factura, server:localhost)
- Then I load the browser, access the page, enter my user and password, and all I got is a blank page, no matter what credential I use, even with invalid users and passwords, I got no error, just a blank page!!

Did I miss something?? is not the right order?? or I just ruin everything!!

I had the 6.01 version from mitel working fine for more than a year. I even reinstall everything using the contribs version, but the same result!!

Can someone guideme to the right direction??

Thanks in advance!!

Manuel

Offline DanB35

  • *****
  • 764
  • +0/-0
    • http://www.familybrown.org
Problem with php and mysql
« Reply #1 on: July 01, 2005, 11:29:07 PM »
Probably whatever support is offered for the PHP apps in question would be a better source than here.  To track down the problem, though, start by taking a look in the system log (/var/log/messages) and the Apache error log (/var/log/httpd/error_log).  If there are PHP errors, they may be shown in one of these sources.
......

gardnc

Problem with php and mysql
« Reply #2 on: July 04, 2005, 02:32:47 PM »
Not sure this is your problem, but I've been kicked in the butt so many times with a similar "problem" that I instantly recognize the symptom.

Be sure your workstation accepts cookies from that SME URL. Not saving a session cookie will often produce this result.

Larry

Offline NickCritten

  • *
  • 245
  • +0/-0
Problem with php and mysql
« Reply #3 on: July 04, 2005, 05:36:34 PM »
Hi Manuelazo

Have you turned on PHP display_errors?
SME default is switched off for some reason.

You can check its status by creating a new file on the server, with the following in it:
Code: [Select]
<? phpinfo(); ?>

Save it as phpinfo.php

Then go to http://server/ibay/phpinfo.php

Under configuration you will see the setting.



If you need to change it, go to command line and do:
Code: [Select]
cp /etc/e-smith/templates/etc/php.ini/30ErrorHandling /etc/e-smith/templates-custom/etc/php.ini/
pico /etc/e-smith/templates-custom/etc/php.ini/30ErrorHandling

now change the display_errors to On (Capital O)
hit ctrl-x, y, enter to save
Code: [Select]
/sbin/e-smith/expand-template /etc/php.ini
/etc/rc.d/init.d/httpd restart


This will set PHP display errors to On so you will be able to see the reason for your php applications not working.

Have fun  :hammer:
...
Nick

"No good deed goes unpunished." :-x...

manuelazo

Problem with php and mysql
« Reply #4 on: July 12, 2005, 04:21:55 PM »
Thanks for your suggestions!! I tried on a new instalation of Centos 4.1, follows the same steps, and everything works!!!, then I updated mysql and php on contribs 6.0.1 from a script I found in this forum (sorry, i don't remeber the link, but it is a script that update contrib 6.0.1 to sme 7, well, some rpms) but got no luck!!

I'll keep trying, if i have no luck, well, I'll start working with sme 7.0 (alpha 23 at this moment)

thanks for your time!