Search found 18 matches

by moleculo
Sun Jan 27, 2008 12:43 pm
Forum: PHP - Code
Topic: Need help with login code - session starts on 2nd attempt
Replies: 4
Views: 249

Re: Need help with login code - session starts on 2nd attempt

I notice that there is a blank like before <?php. Are headers being sent? Sorry, no blank on the actual script. I forgot to remove the space after <code> when posting here. The headers are being sent on the 2nd attempt using <META HTTP-EQUIV="Refresh" CONTENT="1; URL=http://www.domai...
by moleculo
Sun Jan 27, 2008 12:39 pm
Forum: PHP - Code
Topic: Need help with login code - session starts on 2nd attempt
Replies: 4
Views: 249

Re: Need help with login code - session starts on 2nd attempt

What happens if you put session_start at the very beginning of the script? Also put a error_reporting(E_ALL); above it to make sure you're catching all possible errors. Also read up on SQL Injection, you have it all over. If I put session_start at the very beginning, and remove ob_start, I get the ...
by moleculo
Sun Jan 27, 2008 9:15 am
Forum: PHP - Code
Topic: Need help with login code - session starts on 2nd attempt
Replies: 4
Views: 249

Need help with login code - session starts on 2nd attempt

Hello. I having trouble getting this login code to work on the first attempt. This script is called login.php. When I enter a valid username and password, it posts to login.php, starts a session, and redirects back to login.php. On the first attempt, it's not recognizing the session so it goes back ...
by moleculo
Mon Dec 10, 2007 12:14 pm
Forum: PHP - Theory and Design
Topic: Is it possible for php to read from MsSQL?
Replies: 1
Views: 611

Is it possible for php to read from MsSQL?

Hello all. The company I work for uses microsoft sharepoint server to store their databases (I believe this database system is referred to as MsSQL). Is it possible to establish a connection to this database using php? If so, is it the same way as connecting to MySQL, or how is it different? Also, a...
by moleculo
Wed Dec 05, 2007 11:00 am
Forum: PHP - Code
Topic: Need help on posting an array of text that are checkboxed
Replies: 3
Views: 541

Thank you for your help.

I fixed everything with the quotes and the tags.

Where should I put the
print_r($no);
echo $no[0];
echo $qty;

Do you mean put it inside the
for ($i=0; $i<count($_POST['no']);$i++)
{ }

Or should I completely remove the for ($i.....
by moleculo
Tue Dec 04, 2007 11:40 am
Forum: PHP - Code
Topic: Need help on posting an array of text that are checkboxed
Replies: 3
Views: 541

Need help on posting an array of text that are checkboxed

feyd | Please use , 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] Hello. I'...
by moleculo
Mon Nov 19, 2007 12:53 pm
Forum: PHP - Code
Topic: fopen function
Replies: 18
Views: 1166

feyd wrote:Several of us will also suggest you stop using Dreamweaver too. ;)
I want to. Which editor would you recommend?
by moleculo
Mon Nov 19, 2007 12:52 pm
Forum: PHP - Code
Topic: fopen function
Replies: 18
Views: 1166

No, I think you should right click on the folder in the FTP window using Dreamweaver. You don't need a CLI client at all for what you are doing. Use your FTP client in Dreamweaver. Right click-then what? I'm not seeing an option to change permissions on folders when I right-click. Am I missing some...
by moleculo
Mon Nov 19, 2007 12:27 pm
Forum: PHP - Code
Topic: fopen function
Replies: 18
Views: 1166

Everah wrote:You don't need a CLI client. If you are connecting to your server through SSH use something like Putty if you are on Windows. Otherwise, use your terminal on Mac/*nix.
I'm not using SSH. I'm connecting by FTP through dreamweaver. You think I should install putty instead?
by moleculo
Mon Nov 19, 2007 12:07 pm
Forum: PHP - Code
Topic: fopen function
Replies: 18
Views: 1166

Any recommendations for a CLI client?

I'm having trouble installing ezpublisher.
by moleculo
Mon Nov 19, 2007 10:54 am
Forum: PHP - Code
Topic: fopen function
Replies: 18
Views: 1166

Ok, I'm gonna try it with CLI.

I've never worked on CLI before. Do you recommend any package for installing it for windows?

How's ezpublish?
http://ez.no/ezpublish/documentation/in ... ge_php_cli
by moleculo
Mon Nov 19, 2007 10:34 am
Forum: PHP - Code
Topic: fopen function
Replies: 18
Views: 1166

You don't want to chmod permissions on public_html, you want to do it on the directory that needs to be accessed and on that directory only. You typically do not do this programmatically, but through either the CLI with a chmod command or through an FTP client of some sort. When I created the direc...
by moleculo
Mon Nov 19, 2007 10:19 am
Forum: PHP - Code
Topic: fopen function
Replies: 18
Views: 1166

That error is due to the fact that PHP has not been given permission to read and/or write to the directory or file in question. CHMOD time. But there is a CHMOD in the script. Could you please take a look at the script in the link above and tell me if the CHMOD part is written correctly or needs ad...
by moleculo
Mon Nov 19, 2007 10:17 am
Forum: PHP - Code
Topic: fopen function
Replies: 18
Views: 1166

Permission denied usually means that means your web server doesn't have permission to view/open that file. What are the permissions on that directory/file? the public_html directory is set to 750. When I tried to change it, some problems were created where php was unable to read from the mysql data...
by moleculo
Mon Nov 19, 2007 9:51 am
Forum: PHP - Code
Topic: fopen function
Replies: 18
Views: 1166

Oops, I forgot to mention that I also tried with the leading slash.

I get this with the leading slash:
Warning: fopen(/home/molin3/public_html/htm/HTPA2A153.htm) [function.fopen]: failed to open stream: Permission denied in /home/molin3/public_html/htm/addfile.php