Re: [PHP-DB] MySQL PHP hosting

2005-02-09 Thread Marcus Joyce
You could also try www.vitalspeeds.com they dont host any microsoft 
stuff like .Net or ASP but they are reliable and cheap. Hope this helps.

Regards,
Marcus Joyce
J. Connolly wrote:
Is there a site that someone could recommend that does PHP, Mysql 
hosting? If they do .NET that would be good also. This is for practice 
and development not for a company so I am looking to keep the costs 
down. There are so many sites, I thought maybe someone here might have 
a good solution.

jzf
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] MySQL PHP hosting

2005-02-09 Thread Robby Russell
On Tue, 2005-02-08 at 16:07 -0500, J. Connolly wrote:
 Is there a site that someone could recommend that does PHP, Mysql 
 hosting? If they do .NET that would be good also. This is for practice 
 and development not for a company so I am looking to keep the costs 
 down. There are so many sites, I thought maybe someone here might have a 
 good solution.
 
 jzf
 

http://www.planetargon.com/hosting/



-- 
/***
* Robby Russell | Owner.Developer.Geek
* PLANET ARGON  | www.planetargon.com
* Portland, OR  | [EMAIL PROTECTED]
* 503.351.4730  | blog.planetargon.com
* PHP/PostgreSQL Hosting  Development
* --- Now hosting Ruby on Rails Apps ---
/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] mysqli connection problem

2005-02-09 Thread Denis Gerasimov

Hello,

I've made some tests and now I suspect that what I see is a DB package bug.

I run the following script and it works fine:

?php

$mysqli = new mysqli(localhost, test1, , testdb);

/* check connection */ 
if (mysqli_connect_errno()) {
printf(Connect failed: %s\n, mysqli_connect_error());
exit();
}

printf(Host information: %s\n, $mysqli-host_info);

if ($result = $mysqli-query(SELECT * FROM contents)) {
printf(Select returned  %d rows, $result-num_rows);

}

while ($row = mysqli_fetch_assoc($result)) {
print_r($row);
}

/* close connection */
$mysqli-close();

?

While trying to connect to the same db using PEAR::DB_DataObject (connection
string: mysqli://[EMAIL PROTECTED]/testdb)

Still gives me this error
Can't connect to local MySQL server through socket '' (111)

 -Original Message-
 From: Martin Norland [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, February 08, 2005 10:19 PM
 To: php-db@lists.php.net
 Cc: 'MySQL General List'; 'PHP General List'
 Subject: Re: [PHP-DB] mysqli connection problem
 
 My intention of setting the reply-to was not to offend, or claim you
 were wrong - merely to move the discussion to the list I felt (and still
 feel - as I've done it again) is most appropriate for the question.
 
 anyway, back to the task at hand
 
 ( first: I'm assuming you restarted apache after changing your php.ini -
 otherwise, that's your problem. )
 
 Whatever the case, the error message clearly shows that it is not
 reading the value, however it's set - because the error is still showing
 a blank string for the socket.  If it were a permissions problem with
 the socket, you wouldn't be getting that exact error - at the very
 least, it would still show the correct socket path.  More likely, it
 would also error with a cannot open socket or equivalent.
 
 You may wish to examine ini_get(), ini_get_all(), phpinfo(), or
 php_ini_scanned_files(), to verify if it is set, or to see if it's being
 overwritten somewhere.
 
 Cheers,
 
 Denis Gerasimov wrote:
  Didn't help me. MySQL socket does exist - /var/lib/mysql/mysql.sock
 (default
  location).
  mysqli.default_socket is NOT set to null but to this value (manually, as
 you
  advised)
 
  Again,
 
  1. Connection to localhost still fails with message Can't connect to
 local
  MySQL server through socket '' (111)
 
  2. Connection to server's domain name fails too (!) with message Access
  denied for user 'user'@'example.com' (using password: YES)
 
  3. Connection to localhost through mysql shows the following config
 
  mysql status
  --
  mysql  Ver 14.7 Distrib 4.1.9, for pc-linux-gnu (i686)
 
  Connection id:  42
  Current database:
  Current user:   [EMAIL PROTECTED]
  SSL:Not in use
  Current pager:  stdout
  Using outfile:  ''
  Using delimiter:;
  Server version: 4.1.9-standard
  Protocol version:   10
  Connection: Localhost via UNIX socket
  Server characterset:latin1
  Db characterset:latin1
  Client characterset:latin1
  Conn.  characterset:latin1
  UNIX socket:/var/lib/mysql/mysql.sock
  Uptime: 1 day 3 hours 1 min 7 sec
 
  Threads: 3  Questions: 272  Slow queries: 0  Opens: 64  Flush tables: 1
  Open tables: 26  Queries per second avg: 0.003
  --
 
  Seems to be a security issue... Any more ideas about these symptoms?
 
 
 -
 I can't see any reason why you wouldn't be able to use the same socket -
 you're connecting to the same exact server, it's just a path.  You
 should be perfectly able to set your mysqli.default_socket to the same
 as the mysql.default_socket.  I can't tell you what the default for your
 system is, but there are php functions to get configuration options, if
 you don't have it in any obvious places.
 
 Cheers,
 --
 - Martin Norland, Database / Web Developer, International Outreach x3257
 The opinion(s) contained within this email do not necessarily represent
 those of St. Jude Children's Research Hospital.
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 
 
 --
 - Martin Norland, Database / Web Developer, International Outreach x3257
 The opinion(s) contained within this email do not necessarily represent
 those of St. Jude Children's Research Hospital.
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Reg Exp to change c:\dir\dir\pic.jpg to dir/pic.jpg - to upload image path

2005-02-09 Thread ioannes
I am trying to upload images - in fact an image path - from a PC.

I use the input  tag:

INPUT NAME=addpic TYPE=file

which nicely gives an input textfield and Browse button!  This gives me, in the 
input box, eg:

c:\pics\subdir\pic1.jpg

The relative path on the server is something like: 

subdir/pics1.jpg

thus I need to transform the string:

c:\subdir\pics\pics1.jpg

into: 

pics/pics1.jpg


I can use str_replace() to change \ into /.  I am looking for an expression 
from some clever person to get rid of c:\subdir\ given that I don't know the 
exact 'subdir' or name of the image.

Regards,

John

RE: [PHP-DB] Reg Exp to change c:\dir\dir\pic.jpg to dir/pic.jpg - to uploadimage path

2005-02-09 Thread Darryl
You could use something like

$fileloc = subdir/.$_FILES[addpic][name];

-Original Message-
From: Bastien Koert [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 09, 2005 9:44 PM
To: [EMAIL PROTECTED]; php-db@lists.php.net
Subject: RE: [PHP-DB] Reg Exp to change c:\dir\dir\pic.jpg to dir/pic.jpg -
to uploadimage path

Whats the reason to keep the image path from the host pc?

The server will dump the uploaded file into a temp area fro which you can 
either move it to a permanent dir or load it into a db. The only path that 
you really need to worry about the one on the server, which you can handle 
by

1. leaving it fixed and coding it into your scripts
2. make it somewhat variable (if you were storing images by username or 
something like that) which you can handle by storing in the db.


Once the image is uploaded, there is no use for the user's path. If he 
changes OSs its gone and of no value...

Bastien



From: ioannes [EMAIL PROTECTED]
To: php-db@lists.php.net
Subject: [PHP-DB] Reg Exp to change c:\dir\dir\pic.jpg to dir/pic.jpg - to 
upload image path
Date: Wed, 9 Feb 2005 19:14:14 -

I am trying to upload images - in fact an image path - from a PC.

I use the input  tag:

INPUT NAME=addpic TYPE=file

which nicely gives an input textfield and Browse button!  This gives me, in

the input box, eg:

c:\pics\subdir\pic1.jpg

The relative path on the server is something like:

subdir/pics1.jpg

thus I need to transform the string:

c:\subdir\pics\pics1.jpg

into:

pics/pics1.jpg


I can use str_replace() to change \ into /.  I am looking for an 
expression from some clever person to get rid of c:\subdir\ given that I 
don't know the exact 'subdir' or name of the image.

Regards,

John

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[suspicious - maybe spam] [PHP-DB] [suspicious - maybe spam] Re: [PHP-DB] Reg Exp to change c:\dir\dir\pic.jpg to dir/pic.jpg - to upload image path

2005-02-09 Thread J R
hi you don't have to bother your self of such things. html does it all
for you. All you have to do is manage the uploaded file which is put
as a temporary file on the server temporary folder. Here's some tip:

temporary file in your server: $_FILES[file][tmp_name] 
name of your file (the uploaded): $_FILES[file][name]

now use move_uploaded_file  function to where ever location you want
to put your file on your server.

 http://ph.php.net/manual/en/function.move-uploaded-file.php  


cheers!



On Wed, 09 Feb 2005 14:44:07 -0500, Bastien Koert [EMAIL PROTECTED] wrote:
 Whats the reason to keep the image path from the host pc?
 
 The server will dump the uploaded file into a temp area fro which you can
 either move it to a permanent dir or load it into a db. The only path that
 you really need to worry about the one on the server, which you can handle
 by
 
 1. leaving it fixed and coding it into your scripts
 2. make it somewhat variable (if you were storing images by username or
 something like that) which you can handle by storing in the db.
 
 Once the image is uploaded, there is no use for the user's path. If he
 changes OSs its gone and of no value...
 
 Bastien
 
 From: ioannes [EMAIL PROTECTED]
 To: php-db@lists.php.net
 Subject: [PHP-DB] Reg Exp to change c:\dir\dir\pic.jpg to dir/pic.jpg - to
 upload image path
 Date: Wed, 9 Feb 2005 19:14:14 -
 
 I am trying to upload images - in fact an image path - from a PC.
 
 I use the input  tag:
 
 INPUT NAME=addpic TYPE=file
 
 which nicely gives an input textfield and Browse button!  This gives me, in
 the input box, eg:
 
 c:\pics\subdir\pic1.jpg
 
 The relative path on the server is something like:
 
 subdir/pics1.jpg
 
 thus I need to transform the string:
 
 c:\subdir\pics\pics1.jpg
 
 into:
 
 pics/pics1.jpg
 
 
 I can use str_replace() to change \ into /.  I am looking for an
 expression from some clever person to get rid of c:\subdir\ given that I
 don't know the exact 'subdir' or name of the image.
 
 Regards,
 
 John
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
GMail Rocks!!!

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] 'Order by' question

2005-02-09 Thread Justin.Baiocchi
Hi,

I have a MySQL varchar column which I wish to display. Most of the
entries are numbers eg 1, 2, 3 etc etc. But some are numbers and letters
eg 34A, 34B, 35A.

When I display the column I am able to sort by number using the order
by column_name+0 command, as in:

$result = mysql_query(SELECT id, house, pen, date_format(start,'%M %D,
%Y') as start, date_format(end,'%M %D, %Y') as end, details FROM
animalhouse WHERE house='old' ORDER BY pen+0) or die (mysql_error());


However, it doesn't sort the letters properly, so I get 34B, 34A, 34C
etc etc.

Is there a simple way for me to make it sort by number first and then by
letter?

Thanks
Justin

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] 'Order by' question

2005-02-09 Thread John Holmes
[EMAIL PROTECTED] wrote:
Hi,
I have a MySQL varchar column which I wish to display. Most of the
entries are numbers eg 1, 2, 3 etc etc. But some are numbers and letters
eg 34A, 34B, 35A.
When I display the column I am able to sort by number using the order
by column_name+0 command, as in:
$result = mysql_query(SELECT id, house, pen, date_format(start,'%M %D,
%Y') as start, date_format(end,'%M %D, %Y') as end, details FROM
animalhouse WHERE house='old' ORDER BY pen+0) or die (mysql_error());
However, it doesn't sort the letters properly, so I get 34B, 34A, 34C
etc etc.
Is there a simple way for me to make it sort by number first and then by
letter?
Not in your query. Try resorting it using a natural sort in PHP. The A, 
B, and C should be in another column, anyhow.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals  www.phparch.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Is there anything non commercial pdf lib to create PDF file from PHP ?

2005-02-09 Thread santoso berkah
Dear Friends,

Is there anything non commercial pdf library (stable
release) to create PDF file from PHP except PHPlib.com
?
I've browsed this site and it costed Euro 450.

Can you help me please ?

Best regards,

[EMAIL PROTECTED]

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php